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
Which is faster call by value or call by reference?
Can we access instance variables within static methods ?
What is an example of a boolean?
Can we restart a thread already started in java?
What is oop principle in java?
What is basic syntax?
What do you mean by light weight and heavy weight components?
What is array length?
What is starvation?
Why do we use bufferedreader?
How do you execute a thread in java?
Can we create our own daemon thread?
What are the rules for variable declaration?
What is a parent class in java?
Why string is called as immutable?