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
What is methods and methodology?
how many types of Inheritance?
Is oracle java 11 free?
Why does java not support pointers?
What are kinds of processors?
Can we extend immutable class?
Is boolean a data type in java?
What are pass by reference and pass by value?
Does list allow duplicates in java?
What is assembly language?
What is java reflection api?
What is meant by class?
What is an iterator java?
What do you mean by ternary operator in java?
Explain the features of interfaces in java?