When should I use abstract classes and when should I use
interfaces?
Answer Posted / ved.b.tripathi
Interface : when you about to maintain the standard through
out the application then,blindly go with the interface.
Abstract : when you customize the behavior but still want to
maintain some standard then use abstract,because in abstract
you can have non abstract method that will be use by every
class that extend this abstract method and that class also
have to give the body of abstract methods(standard).
| Is This Answer Correct ? | 15 Yes | 2 No |
Post New Answer View All Answers
difference between byte stream class and character stream class?
What is difference overloading and overriding?
Define max and min heap, also the search time of heap.
What is a databasemetadata?
What is the purpose of abstract class?
What is boolean flag in java?
What are the types of arrays in java?
What is %02d?
How do I type unicode?
Explain what do you mean by functional overloading in java?
Write code of any action class?
What is difference between overloading and overriding in java?
What is the r character?
What is exception in java?
What is float in java?