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
Explain about join() method?
What is the difference between break and continue statements?
what is heap memory?
How many types of design patterns are there?
What is threaded programming and when is it used? : Java thread
What is the preferred size of a component in java programming?
What is an exception? difference between Checked and Unchecked exception in Java
What are the benefits of operations?
what do you mean by classloader?
What is set in java?
Why hashcode is used in java?
What is 32 bit float?
What is java jit compilers?
How do you remove duplicates in java?
Why collection is called framework in java?