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
Differentiate between stringbuffer and string?
Explain different types of wrapper classes in java?
Explain try and catch keywords in java?
Can we override protected method in java?
What are singleton services?
Define interface in java?
What are the super most classes for all the streams?
What is string builder?
What is extension method in java?
What happens when I use / and % with a negative numerator?
How concurrent hashmap works?
what is difference betweem home interface and remote interface?
What 4 doubled?
What are triggers in DB? Explain their types. How do they work?
What is purpose of find feature?