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 a static class in java?
What is the vector class in java programming?
What is parameters example?
Define jit compiler?
What is meant by class loader? How many types are there? When will we use them?
Can variables be used in java without initialization?
What is a method vs function?
What is the access scope of protected access specifier?
What does s mean in regex?
What is anti pattern in java?
What is java’s garbage collected heap?
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
Is java a virus?
what is meant by Byte code concept in Java?
What is thread safe singleton?