Browse Today's favorites or All time favorites.
Please Sign In or Register to share and submit your questions.
Java Queries
Complete java interview questions library
Home » Interview Questions » Core Java Interview Questions » What is similarities/difference between an Abstract class and Interface?
What is similarities/difference between an Abstract class and Interface?
Differences are as follows:
* Interfaces provide a form of multiple inheritance. A class can extend only one other class.
* Interfaces are limited to public methods and constants with no implementation. Abstract classes can have a partial implementation, protected parts, static methods, etc.
* A Class may implement several interfaces. But in case of abstract class, a class may extend only one abstract class.
* Interfaces are slow as it requires extra indirection to to find corresponding method in in the actual class. Abstract classes are fast.
Similarities:
* Neither Abstract classes or Interface can be instantiated.
Things your CV should not have
Your CV is your marketing brochure through which you try to sell a commodity, ie your skills to the potential buyer ie the prospective employer. The sole purpose of your CV is to fetch you an interview call. Nothing more, nothing less.
Write a comment