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
What are the 7 types of characters?
Explain the inheritance?
worst case complexities of Quick sort and Merge sort.
What is isa relationship?
Can substring create new object?
What is the difference between class forname and new?
Why does java not support pointers?
How are observer and observable used in java programming?
What is polymorphism and what are the types of it?
What does it mean that a method or field is “static”?
Can we use catch statement for checked exceptions?
What is a byte array?
What is exception propagation?
What does compareto () do in java?
Why is the type for real numbers called double?