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
Define inheritance?
What are methods in java?
What are inbuilt functions?
What are the main concepts of oops in java?
What is the default value of the local variables?
Which class contains a method: cloneable or object?
Can we restart a dead thread in java?
How do you empty a list in java?
Does google use java?
What do you mean by chromounits in java8?
Explain the difference between collection api and stream api in java8?
List primitive java types?
What is the disadvantage of java?
How do you read and print a string in java?
What is a flag variable?