SlideShare a Scribd company logo
1 of 1
Download to read offline
Can these statements be compiled successfully? If not, what's the problem?
K[]a=newK[9];a[5]=newM();a[6]=newN(); a. No. array "a" has not been initialized. b. No. a[6]
and a[5] are null values and cannot assign value to any of them. c. No. K is an abstract class and
cannot be instaitnated. d. Yes they can be compiled successfully.
Can these statements be compiled successfully? If not, what's the problem? Kk1 = new M();
System.out.println(k1.getP()); a. No. K is an abstract class and cannot be instantiated. b. No.k1
cannot store an object instance of class M. c. Yes they can be compiled successfully. d. No.
getP0 is an abstract method and cannot be called.
Can these statements be compiled successfully? If not, what's the problem? N[]b= new N[1]b[]=
new M(); System.out.print ln(b[]getQ()); a. Yes they can be compiled successfully. b. No.
Invalid calling of method getQ0. c. No. b[0] cannot store an object instance of class M. d. No.
ArraylndexOutOfBound execption will be thrown.

More Related Content

More from agrawalagenciesmobil

CASE STUDY 3-3 TRAVELING GERMS A phlebotomist works the morning sh.pdf
 CASE STUDY 3-3 TRAVELING GERMS A phlebotomist works the morning sh.pdf CASE STUDY 3-3 TRAVELING GERMS A phlebotomist works the morning sh.pdf
CASE STUDY 3-3 TRAVELING GERMS A phlebotomist works the morning sh.pdf
agrawalagenciesmobil
 
Case A Credit rating agency is a company that assesses the finan.pdf
 Case A Credit rating agency is a company that assesses the finan.pdf Case A Credit rating agency is a company that assesses the finan.pdf
Case A Credit rating agency is a company that assesses the finan.pdf
agrawalagenciesmobil
 

More from agrawalagenciesmobil (13)

Check all the general characteristics of eukaryotic flagella and cili.pdf
 Check all the general characteristics of eukaryotic flagella and cili.pdf Check all the general characteristics of eukaryotic flagella and cili.pdf
Check all the general characteristics of eukaryotic flagella and cili.pdf
 
cases. Woodson Compicy sels mary products. Gititio in one of tse po.pdf
 cases. Woodson Compicy sels mary products. Gititio in one of tse po.pdf cases. Woodson Compicy sels mary products. Gititio in one of tse po.pdf
cases. Woodson Compicy sels mary products. Gititio in one of tse po.pdf
 
CASE STUDY 3-3 TRAVELING GERMS A phlebotomist works the morning sh.pdf
 CASE STUDY 3-3 TRAVELING GERMS A phlebotomist works the morning sh.pdf CASE STUDY 3-3 TRAVELING GERMS A phlebotomist works the morning sh.pdf
CASE STUDY 3-3 TRAVELING GERMS A phlebotomist works the morning sh.pdf
 
Case A Credit rating agency is a company that assesses the finan.pdf
 Case A Credit rating agency is a company that assesses the finan.pdf Case A Credit rating agency is a company that assesses the finan.pdf
Case A Credit rating agency is a company that assesses the finan.pdf
 
CARDIAC DYSRHYTHMIAS You work on a telemetry floor. Your patients are.pdf
 CARDIAC DYSRHYTHMIAS You work on a telemetry floor. Your patients are.pdf CARDIAC DYSRHYTHMIAS You work on a telemetry floor. Your patients are.pdf
CARDIAC DYSRHYTHMIAS You work on a telemetry floor. Your patients are.pdf
 
can be prevented by avoiding rodent habitats and reducing rodent popu.pdf
 can be prevented by avoiding rodent habitats and reducing rodent popu.pdf can be prevented by avoiding rodent habitats and reducing rodent popu.pdf
can be prevented by avoiding rodent habitats and reducing rodent popu.pdf
 
Bir irketin cari oran 2, toplam aktifleri 10.000 TL ve duran varlkl.pdf
 Bir irketin cari oran 2, toplam aktifleri 10.000 TL ve duran varlkl.pdf Bir irketin cari oran 2, toplam aktifleri 10.000 TL ve duran varlkl.pdf
Bir irketin cari oran 2, toplam aktifleri 10.000 TL ve duran varlkl.pdf
 
Bir y�netici olarak, ekonomik ve ticari raporlar okurken veya din.pdf
 Bir y�netici olarak, ekonomik ve ticari raporlar okurken veya din.pdf Bir y�netici olarak, ekonomik ve ticari raporlar okurken veya din.pdf
Bir y�netici olarak, ekonomik ve ticari raporlar okurken veya din.pdf
 
Blossom Ltd. had the following share transactions during its first ye.pdf
 Blossom Ltd. had the following share transactions during its first ye.pdf Blossom Ltd. had the following share transactions during its first ye.pdf
Blossom Ltd. had the following share transactions during its first ye.pdf
 
Beta Co. provides the following information about its investing activ.pdf
 Beta Co. provides the following information about its investing activ.pdf Beta Co. provides the following information about its investing activ.pdf
Beta Co. provides the following information about its investing activ.pdf
 
Below is information taken from XYZs financial statements for the .pdf
 Below is information taken from XYZs financial statements for the .pdf Below is information taken from XYZs financial statements for the .pdf
Below is information taken from XYZs financial statements for the .pdf
 
Bean Company uses job costing and has assembled the following cost da.pdf
 Bean Company uses job costing and has assembled the following cost da.pdf Bean Company uses job costing and has assembled the following cost da.pdf
Bean Company uses job costing and has assembled the following cost da.pdf
 
BE5.4 (LO 2) AP Prepare the journal entries to record the following p.pdf
 BE5.4 (LO 2) AP Prepare the journal entries to record the following p.pdf BE5.4 (LO 2) AP Prepare the journal entries to record the following p.pdf
BE5.4 (LO 2) AP Prepare the journal entries to record the following p.pdf
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Recently uploaded (20)

Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 

Can these statements be compiled successfully If not, whats the pro.pdf

  • 1. Can these statements be compiled successfully? If not, what's the problem? K[]a=newK[9];a[5]=newM();a[6]=newN(); a. No. array "a" has not been initialized. b. No. a[6] and a[5] are null values and cannot assign value to any of them. c. No. K is an abstract class and cannot be instaitnated. d. Yes they can be compiled successfully. Can these statements be compiled successfully? If not, what's the problem? Kk1 = new M(); System.out.println(k1.getP()); a. No. K is an abstract class and cannot be instantiated. b. No.k1 cannot store an object instance of class M. c. Yes they can be compiled successfully. d. No. getP0 is an abstract method and cannot be called. Can these statements be compiled successfully? If not, what's the problem? N[]b= new N[1]b[]= new M(); System.out.print ln(b[]getQ()); a. Yes they can be compiled successfully. b. No. Invalid calling of method getQ0. c. No. b[0] cannot store an object instance of class M. d. No. ArraylndexOutOfBound execption will be thrown.