when to use abstract class and when to use interface?
Answer Posted / muthusenthil
Abstract(patially implemented) class can be used as a
common base class for an application it has all property of
class except it cannot be instantiated.it provide default
behavior.
interface is mearly a specification,nothing implemented for
any standalone project which can be changed at will its
more design flexible and it can be utilized to model
multipleinheritance.
| Is This Answer Correct ? | 56 Yes | 30 No |
Post New Answer View All Answers
Wha is the output from system.out.println(“hello”+null); ?
What is difference between string and new string?
What is sizeof () operator?
What is the purpose of abstract class?
Explain what is encapsulation?
Is vector thread safe in java?
What is the difference between a synchronized method and a synchronized block?
What does n mean?
What are the differences between checked exception and unchecked exception?
Explain with example the concept of constant variable in java.
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
What are jee technologies?
What does a boolean method return?
What is passing value java?
What is the original name of java?