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 the purpose of garbage collection in java? When is it used?
What is the major advantage of external iteration over internal iteration?
what is interface in java? Explain
What are the common uses of "this" keyword in java ?
How do you sort a string in java?
What is string pool?
What is an abstract class and what is it’s purpose?
What is methods in java?
What are format specifiers in java?
Can a serialized object be transferred via network?
Is void a wrapper class?
What do you mean by constant time complexity?
In the below example, how many string objects are created?
What’s the difference between the methods sleep() and wait()?
Explain about method local inner classes or local inner classes in java?