Hi buddy, well i got that there is always a default
constructor with abstract class. OK. But why not with interface?

Thanks in advance.

Answers were Sorted based on User's Feedback



Hi buddy, well i got that there is always a default constructor with abstract class. OK. But why no..

Answer / harsha

Just a samll correction... Interfaces are part of
inheritance tree.
Inheritance is identified by both extends and implements
keywords.

Regarding the default constructor.. All the classes which
extend Object class will have a default constructor.

As we all know any interface cant extend Object class..
Interface cannot have default constructor.

Is This Answer Correct ?    4 Yes 0 No

Hi buddy, well i got that there is always a default constructor with abstract class. OK. But why no..

Answer / madhu

yes it is bcz interfaces are not part of the inheritance tree.

after all u can define a contract between 2 different parties
using interfaces nothing more u can expect. its not actually
an executable construct

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

Why declare Main() inside the class in java ?

0 Answers   HCL,


How can you sort dates?

2 Answers   TCS,


why Java does not support multiple inheritances?

0 Answers   Aspire,


How listener identify that the event came from a particular object?

0 Answers  


Is java jre still free?

0 Answers  


what is the difference between the methods sleep() and wait()? : Java thread

0 Answers  


What is the maximum size of a string in java?

0 Answers  


Write a program to reverse a number in java?

0 Answers  


What is increment in java?

0 Answers  


What are constants and how to create constants in java?

0 Answers  


Is it possible to use string in the switch case?

0 Answers  


What is methodological framework?

0 Answers  


Categories