• Interface Vs Abstract,  Interview Questions,  java

    What is difference between an Abstract class and Interface?

    Abstract Class means Blueprint of the model. Interface and Abstract classes are same functionality and do have similarities and dissimilaties too, beow are some of similarirties and dissimilarities: Similarity: Neither Abstract classes or Interface can be instantiated. Difference: A Class may implement several interfaces. But in case of abstract class, a class may extend only one abstract class. Interface have all abstract method, and an abstract class may contain concreate methods to it. Interfaces are limited to public methods and constants with no implementation. Abstract classes can have a partial implementation, protected parts, static methods. One Abstract method is required to make a class abstract, and all method should be abstract to…

    Comments Off on What is difference between an Abstract class and Interface?