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
Difference between string, stringbuffer and stringbuilder?
Is java a software?
What is parameter example?
Explain all java features with real time examples
What are the advantages of java inner classes?
What is printwriter in java?
Can we define private and protected modifiers for variables in interfaces?
How to stop a thread in java? Explain about sleep () method in a thread?
Can you give few examples of final classes defined in java api?
Is space a character in java?
Explain the difference between abstract classes and interfaces in java?
Can we declare a class as abstract without having any abstract method?
If a method is declared as protected, where may the method be accessed in java programming?
What is a get method?
What is an image buffer?