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
Are strings immutable in java?
What is difference between == and === in js?
Explain wrapper classes in java?
Why put method is used?
What is the difference between declaration and definition in java?
How do I start learning java?
If system.exit (0); is written at the end of the try block, will the finally block still execute?
What is lastindexof in java?
Describe different states of a thread.
Why char array is preferred over string for storing password?
What is the difference between processes and threads?
How do you define a singleton class?
What are the main features of java?
How does enum work in java?
What is the memory leak in java?