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 are static initalizers in java ?
What is linked hashset and its features?
What is the difference between static method and instance method in Java?
What is the difference between static binding and dynamic binding?
What is hashmap and map?
Which class is the superclass for all the classes?
How would you use Bubble Sort to sort the number of elements?
Can we override the static method?
What are the loops in java?
What are the difference between string, string builder, and string buffer in java?
What is an object's lock and which object's have locks in java programming?
Is jdk required on each machine to run a java program?
What is math floor in java?
What is number data type in java?
What is the purpose of java?