Answer Posted / manoshp
Abstract class:- When there are common behaviors for a set of classes and that behavior do not have any existence by its own, these behaviors are defined in an abstract super class. All sub classes will inherit that common behavior by extending the super class.
Interface:- When there are multiple implementations for a set of functionalities, all these behaviors are defined in an interface as entry points without any implementation details to these behaviors. The client class can use this interface without considering the implementation details.
Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is floor in java?
What is the synonym of framework?
When would you use a static class?
Which is better singleton or static class?
What is the largest data type in java?
Which software is used for java programming?
Explain the difference between abstract classes and interfaces in java?
Can a constructor call the constructor of parent class?
Is linked list a linear or non-linear data structure?
Do I need java on my pc?
What is meant by object oriented programming – oop?
When to use runnable interface vs thread class in java?
What is blank final variable?
How are variables stored in memory?
Can we declare the main method of our class as private?