Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

Is java jre still free?

0 Answers  


What is java util?

0 Answers  


What is singleton class?

16 Answers   3i Infotech, 7 Seas, ABC, Amdocs, Cap Gemini, Oracle, Persistent, TCS, Techforza,


If a class is declared without any access modifiers, where can the class be accessed?

0 Answers  


int a=10,b=20,c=30 a= b+c;b=a+c;c=a+b; System.out.println("The value is"+a+b+c;

17 Answers   Honeywell,






What is difference between hashset and hashmap in java?

0 Answers  


What is hash in java?

0 Answers  


Can we make constructors static?

0 Answers  


What are the 8 data types in java?

0 Answers  


What is the difference between yielding and sleeping?

0 Answers  


Can we declare a class as abstract without having any abstract method?

0 Answers  


How does java enable high performance?

0 Answers  






Categories