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
How do you check if a string is lexicographically in java?
What is the use of toarray () in java?
How to compare strings in java?
What is comparable and comparator interface? List their differences
What is run time allocation?
What are some characteristics of interference class?
What is the default execution method in java?
what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread
What is array length in java?
Difference between final and effectively final ? Why is effectively final even required ?
Discuss different types of errors that generally occur while programming.
What is the difference between a static and a non-static inner class in java programming?
List the different types of classloaders in java.
Define an abstract class with reference to java.
What are the advantages of arraylist over arrays?