when to use abstract class and when to use interface?
Answer Posted / ravikiran
abstract class is used if you are willing to restrict the
creation of an instance.
interface is used if you are willing to write different
functionalities in different implementations.
| Is This Answer Correct ? | 34 Yes | 29 No |
Post New Answer View All Answers
What is the difference between variable declaration and variable initialization?
What’s meant by anonymous class?
What is rule of accessibility in java?
Is main a function?
What is finally block?
What environment variables do I need to set on my machine in order to be able to run java programs?
What is an abstract class and what is it’s purpose?
What is jrmp?
Can we access instance variables within static methods ?
what is meant by Byte code concept in Java?
Why webdriver is an interface?
What are the two types of exceptions in java? Which are the differences between them?
Explain the difference between serializable and externalizable in java?
What java is used for?
Does a function need a return?