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 string immutability?
Explain throw keyword in java?
What is the difference between array and array list in java?
Describe different states of a thread.
Can we overload the main() method?
What is the use of default method in interface in java?
What are desktop procedures?
What is nullpointerexception in java?
What are the restrictions imposed by a Security Manager on Applets?.
Can we sort a map in java?
How will you get the platform dependent values like line separator, path separator, etc., ?
How can I debug the Java security exceptions and AccessControlExceptions?
What is boolean keyword in java?
Why is singleton not thread safe?
What are the characteristics of Final,Finally and Finalize keywords.