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
Can a lock be acquired on a class in java programming?
What is the difference between a vector & an array list?
how are methods defined?
When is the arraystoreexception thrown?
What are methods?
Why char array is preferred over string for storing password?
Why are lists ordered in java?
How do you include a string in java?
What does .equals do in java?
What are different access specifiers in java? Explain
What is oop principle in java?
Can we use a default constructor of a class even if an explicit constructor is defined?
What is the Scope of Static Variable?
Can we have more than one package statement in the source file?
What is the difference between replace and replace all?