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
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 |
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 |
What is final method in java?
What is the difference between && and & in java?
How can you say HashMap is syncronized?
How do you sort data in java?
How do you pass by reference?
What variables are stored in stack?
what is the purpose of method overriding in java where v r completely re-defining a inherited method instead y can't v create a new method and define.If the question is very silly plz excuse me and do reply.Thank U!
7 Answers emc2, Kumaran Systems,
Give me an example of array and linked list? Where they can be used?
How is hashcode calculated in java?
where singleton classes are used in j2ee web application.can we use it for connection pooling.
What is increment in java?
What restrictions are placed on method overloading in java programming?