SlideShare a Scribd company logo
1 of 5
Indicate whether each of the following statements is true or
false:
An abstract class can have ordinary methods but an interface
cannot.
An abstract class cannot have any constructors.
No class can implement more than one interface.
It is not possible to create an instance of an abstract class.
All methods of an interface are implicitly public.
Why won't the following program compile? Correct it so that it
will compile and properly implement
Comparable
.
class Int implements Comparable
{
private int x;
public Int(int x)
{
this.x = x;
}
public int compareTo(Int other)
{
return x - other.x;
}
}
What is the output of the following program?
class A
{
public A()
{
System.out.println(
"The default constructor of A is invoked");
}
}
class B extends A
{
public B()
{
System.out.println(
"The default constructor of B is invoked");
}
}
public class C
{
public static void main(String[] args)
{
B b = new B();
}
}
Given the following class and interface definitions:
class Base
{
...
}
interface Spec
{
...
}
class Derived extends Base implements Spec
{
}
For each of the following declarations, indicate whether it is
correct or incorrect and provide an explanation.
Derived object2 = new Base();
Spec object3 = new Derived();
Spec object4 = new Base();
Base object1 = new Derived();
Derived object5 = new Spec();
Indicate whether each of the following will compile and if not,
correct it so it will.
class Class1
{
abstract void method1()
{
}
}
abstract class Class2
{
abstract void method2();
void method3();
}
Indicate whether each of the following statements is true or false.docx

More Related Content

Similar to Indicate whether each of the following statements is true or false.docx

Review Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfmayorothenguyenhob69
 
Xamarin: Namespace and Classes
Xamarin: Namespace and ClassesXamarin: Namespace and Classes
Xamarin: Namespace and ClassesEng Teong Cheah
 
Interfaces.ppt
Interfaces.pptInterfaces.ppt
Interfaces.pptVarunP31
 
Exception handling and packages.pdf
Exception handling and packages.pdfException handling and packages.pdf
Exception handling and packages.pdfKp Sharma
 
21UCAC31 Java Programming.pdf(MTNC)(BCA)
21UCAC31 Java Programming.pdf(MTNC)(BCA)21UCAC31 Java Programming.pdf(MTNC)(BCA)
21UCAC31 Java Programming.pdf(MTNC)(BCA)ssuser7f90ae
 
Interface
InterfaceInterface
Interfacevvpadhu
 
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...yazad dumasia
 
Constructors.16
Constructors.16Constructors.16
Constructors.16myrajendra
 
20.4 Java interfaces and abstraction
20.4 Java interfaces and abstraction20.4 Java interfaces and abstraction
20.4 Java interfaces and abstractionIntro C# Book
 
OCJP Samples Questions: Exceptions and assertions
OCJP Samples Questions: Exceptions and assertionsOCJP Samples Questions: Exceptions and assertions
OCJP Samples Questions: Exceptions and assertionsHari kiran G
 
Structural pattern 3
Structural pattern 3Structural pattern 3
Structural pattern 3Naga Muruga
 
Abstract & Interface
Abstract & InterfaceAbstract & Interface
Abstract & InterfaceLinh Lê
 

Similar to Indicate whether each of the following statements is true or false.docx (20)

Review Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdf
 
Xamarin: Namespace and Classes
Xamarin: Namespace and ClassesXamarin: Namespace and Classes
Xamarin: Namespace and Classes
 
Interfaces .ppt
Interfaces .pptInterfaces .ppt
Interfaces .ppt
 
Interfaces.ppt
Interfaces.pptInterfaces.ppt
Interfaces.ppt
 
Exception handling and packages.pdf
Exception handling and packages.pdfException handling and packages.pdf
Exception handling and packages.pdf
 
21UCAC31 Java Programming.pdf(MTNC)(BCA)
21UCAC31 Java Programming.pdf(MTNC)(BCA)21UCAC31 Java Programming.pdf(MTNC)(BCA)
21UCAC31 Java Programming.pdf(MTNC)(BCA)
 
Java Inheritance
Java InheritanceJava Inheritance
Java Inheritance
 
Java concurrency questions and answers
Java concurrency questions and answers Java concurrency questions and answers
Java concurrency questions and answers
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
 
Interface
InterfaceInterface
Interface
 
Major Java 8 features
Major Java 8 featuresMajor Java 8 features
Major Java 8 features
 
Interface in java
Interface in javaInterface in java
Interface in java
 
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
 
Constructors.16
Constructors.16Constructors.16
Constructors.16
 
20.4 Java interfaces and abstraction
20.4 Java interfaces and abstraction20.4 Java interfaces and abstraction
20.4 Java interfaces and abstraction
 
OCJP Samples Questions: Exceptions and assertions
OCJP Samples Questions: Exceptions and assertionsOCJP Samples Questions: Exceptions and assertions
OCJP Samples Questions: Exceptions and assertions
 
Structural pattern 3
Structural pattern 3Structural pattern 3
Structural pattern 3
 
Abstract & Interface
Abstract & InterfaceAbstract & Interface
Abstract & Interface
 
Ppt of c++ vs c#
Ppt of c++ vs c#Ppt of c++ vs c#
Ppt of c++ vs c#
 
polymorphism.ppt
polymorphism.pptpolymorphism.ppt
polymorphism.ppt
 

More from migdalialyle

Include recommendations on how the Kelsey Elementary School should d.docx
Include recommendations on how the Kelsey Elementary School should d.docxInclude recommendations on how the Kelsey Elementary School should d.docx
Include recommendations on how the Kelsey Elementary School should d.docxmigdalialyle
 
Include an introductionDescribe Final System Acceptance Criteria.docx
Include an introductionDescribe Final System Acceptance Criteria.docxInclude an introductionDescribe Final System Acceptance Criteria.docx
Include an introductionDescribe Final System Acceptance Criteria.docxmigdalialyle
 
Include the following Complete summary of the case study that ide.docx
Include the following Complete summary of the case study that ide.docxInclude the following Complete summary of the case study that ide.docx
Include the following Complete summary of the case study that ide.docxmigdalialyle
 
Incentives and Their Effects Please respond to the followingR.docx
Incentives and Their Effects Please respond to the followingR.docxIncentives and Their Effects Please respond to the followingR.docx
Incentives and Their Effects Please respond to the followingR.docxmigdalialyle
 
In your own words, using two approaches, contrast global tax syste.docx
In your own words, using two approaches, contrast global tax syste.docxIn your own words, using two approaches, contrast global tax syste.docx
In your own words, using two approaches, contrast global tax syste.docxmigdalialyle
 
In your textbook, Feenstra (2011) states, As we explore persuasion,.docx
In your textbook, Feenstra (2011) states, As we explore persuasion,.docxIn your textbook, Feenstra (2011) states, As we explore persuasion,.docx
In your textbook, Feenstra (2011) states, As we explore persuasion,.docxmigdalialyle
 
In your own words, relate the importance of the current account (f.docx
In your own words, relate the importance of the current account (f.docxIn your own words, relate the importance of the current account (f.docx
In your own words, relate the importance of the current account (f.docxmigdalialyle
 
In your own words, relate the importance of the financial account .docx
In your own words, relate the importance of the financial account .docxIn your own words, relate the importance of the financial account .docx
In your own words, relate the importance of the financial account .docxmigdalialyle
 
In your own words, relate the Fisher Effect to exchange rates. .docx
In your own words, relate the Fisher Effect to exchange rates. .docxIn your own words, relate the Fisher Effect to exchange rates. .docx
In your own words, relate the Fisher Effect to exchange rates. .docxmigdalialyle
 
In your own words, formulate strategies that can be used by MNEs t.docx
In your own words, formulate strategies that can be used by MNEs t.docxIn your own words, formulate strategies that can be used by MNEs t.docx
In your own words, formulate strategies that can be used by MNEs t.docxmigdalialyle
 
In your own words, explain why debt markets are important to optim.docx
In your own words, explain why debt markets are important to optim.docxIn your own words, explain why debt markets are important to optim.docx
In your own words, explain why debt markets are important to optim.docxmigdalialyle
 
In your own words, relate the asset market approach to forecasting.docx
In your own words, relate the asset market approach to forecasting.docxIn your own words, relate the asset market approach to forecasting.docx
In your own words, relate the asset market approach to forecasting.docxmigdalialyle
 
In your own words, explain the importance of diversification in th.docx
In your own words, explain the importance of diversification in th.docxIn your own words, explain the importance of diversification in th.docx
In your own words, explain the importance of diversification in th.docxmigdalialyle
 
In your own words, explain how a value-added-tax works. Yo.docx
In your own words, explain how a value-added-tax works. Yo.docxIn your own words, explain how a value-added-tax works. Yo.docx
In your own words, explain how a value-added-tax works. Yo.docxmigdalialyle
 
In your own words, distinguish different strategies for global exp.docx
In your own words, distinguish different strategies for global exp.docxIn your own words, distinguish different strategies for global exp.docx
In your own words, distinguish different strategies for global exp.docxmigdalialyle
 
In your own words, relate Interest Rate Parity to exchange rate mo.docx
In your own words, relate Interest Rate Parity to exchange rate mo.docxIn your own words, relate Interest Rate Parity to exchange rate mo.docx
In your own words, relate Interest Rate Parity to exchange rate mo.docxmigdalialyle
 
In your own words, distinguish the characteristics of debt instrum.docx
In your own words, distinguish the characteristics of debt instrum.docxIn your own words, distinguish the characteristics of debt instrum.docx
In your own words, distinguish the characteristics of debt instrum.docxmigdalialyle
 
In your own words, distinguish between two proactive methods of ma.docx
In your own words, distinguish between two proactive methods of ma.docxIn your own words, distinguish between two proactive methods of ma.docx
In your own words, distinguish between two proactive methods of ma.docxmigdalialyle
 
In your own words, contrast a Futures Contract and a Forward Contr.docx
In your own words, contrast a Futures Contract and a Forward Contr.docxIn your own words, contrast a Futures Contract and a Forward Contr.docx
In your own words, contrast a Futures Contract and a Forward Contr.docxmigdalialyle
 

More from migdalialyle (20)

Include recommendations on how the Kelsey Elementary School should d.docx
Include recommendations on how the Kelsey Elementary School should d.docxInclude recommendations on how the Kelsey Elementary School should d.docx
Include recommendations on how the Kelsey Elementary School should d.docx
 
Include an introductionDescribe Final System Acceptance Criteria.docx
Include an introductionDescribe Final System Acceptance Criteria.docxInclude an introductionDescribe Final System Acceptance Criteria.docx
Include an introductionDescribe Final System Acceptance Criteria.docx
 
Include the following Complete summary of the case study that ide.docx
Include the following Complete summary of the case study that ide.docxInclude the following Complete summary of the case study that ide.docx
Include the following Complete summary of the case study that ide.docx
 
Incentives and Their Effects Please respond to the followingR.docx
Incentives and Their Effects Please respond to the followingR.docxIncentives and Their Effects Please respond to the followingR.docx
Incentives and Their Effects Please respond to the followingR.docx
 
In.docx
In.docxIn.docx
In.docx
 
In your own words, using two approaches, contrast global tax syste.docx
In your own words, using two approaches, contrast global tax syste.docxIn your own words, using two approaches, contrast global tax syste.docx
In your own words, using two approaches, contrast global tax syste.docx
 
In your textbook, Feenstra (2011) states, As we explore persuasion,.docx
In your textbook, Feenstra (2011) states, As we explore persuasion,.docxIn your textbook, Feenstra (2011) states, As we explore persuasion,.docx
In your textbook, Feenstra (2011) states, As we explore persuasion,.docx
 
In your own words, relate the importance of the current account (f.docx
In your own words, relate the importance of the current account (f.docxIn your own words, relate the importance of the current account (f.docx
In your own words, relate the importance of the current account (f.docx
 
In your own words, relate the importance of the financial account .docx
In your own words, relate the importance of the financial account .docxIn your own words, relate the importance of the financial account .docx
In your own words, relate the importance of the financial account .docx
 
In your own words, relate the Fisher Effect to exchange rates. .docx
In your own words, relate the Fisher Effect to exchange rates. .docxIn your own words, relate the Fisher Effect to exchange rates. .docx
In your own words, relate the Fisher Effect to exchange rates. .docx
 
In your own words, formulate strategies that can be used by MNEs t.docx
In your own words, formulate strategies that can be used by MNEs t.docxIn your own words, formulate strategies that can be used by MNEs t.docx
In your own words, formulate strategies that can be used by MNEs t.docx
 
In your own words, explain why debt markets are important to optim.docx
In your own words, explain why debt markets are important to optim.docxIn your own words, explain why debt markets are important to optim.docx
In your own words, explain why debt markets are important to optim.docx
 
In your own words, relate the asset market approach to forecasting.docx
In your own words, relate the asset market approach to forecasting.docxIn your own words, relate the asset market approach to forecasting.docx
In your own words, relate the asset market approach to forecasting.docx
 
In your own words, explain the importance of diversification in th.docx
In your own words, explain the importance of diversification in th.docxIn your own words, explain the importance of diversification in th.docx
In your own words, explain the importance of diversification in th.docx
 
In your own words, explain how a value-added-tax works. Yo.docx
In your own words, explain how a value-added-tax works. Yo.docxIn your own words, explain how a value-added-tax works. Yo.docx
In your own words, explain how a value-added-tax works. Yo.docx
 
In your own words, distinguish different strategies for global exp.docx
In your own words, distinguish different strategies for global exp.docxIn your own words, distinguish different strategies for global exp.docx
In your own words, distinguish different strategies for global exp.docx
 
In your own words, relate Interest Rate Parity to exchange rate mo.docx
In your own words, relate Interest Rate Parity to exchange rate mo.docxIn your own words, relate Interest Rate Parity to exchange rate mo.docx
In your own words, relate Interest Rate Parity to exchange rate mo.docx
 
In your own words, distinguish the characteristics of debt instrum.docx
In your own words, distinguish the characteristics of debt instrum.docxIn your own words, distinguish the characteristics of debt instrum.docx
In your own words, distinguish the characteristics of debt instrum.docx
 
In your own words, distinguish between two proactive methods of ma.docx
In your own words, distinguish between two proactive methods of ma.docxIn your own words, distinguish between two proactive methods of ma.docx
In your own words, distinguish between two proactive methods of ma.docx
 
In your own words, contrast a Futures Contract and a Forward Contr.docx
In your own words, contrast a Futures Contract and a Forward Contr.docxIn your own words, contrast a Futures Contract and a Forward Contr.docx
In your own words, contrast a Futures Contract and a Forward Contr.docx
 

Recently uploaded

ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 

Recently uploaded (20)

ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 

Indicate whether each of the following statements is true or false.docx

  • 1. Indicate whether each of the following statements is true or false: An abstract class can have ordinary methods but an interface cannot. An abstract class cannot have any constructors. No class can implement more than one interface. It is not possible to create an instance of an abstract class. All methods of an interface are implicitly public. Why won't the following program compile? Correct it so that it will compile and properly implement Comparable . class Int implements Comparable { private int x; public Int(int x) { this.x = x; } public int compareTo(Int other) { return x - other.x; }
  • 2. } What is the output of the following program? class A { public A() { System.out.println( "The default constructor of A is invoked"); } } class B extends A { public B() { System.out.println( "The default constructor of B is invoked"); } }
  • 3. public class C { public static void main(String[] args) { B b = new B(); } } Given the following class and interface definitions: class Base { ... } interface Spec { ... }
  • 4. class Derived extends Base implements Spec { } For each of the following declarations, indicate whether it is correct or incorrect and provide an explanation. Derived object2 = new Base(); Spec object3 = new Derived(); Spec object4 = new Base(); Base object1 = new Derived(); Derived object5 = new Spec(); Indicate whether each of the following will compile and if not, correct it so it will. class Class1 { abstract void method1() { } } abstract class Class2 { abstract void method2(); void method3(); }