Interface – Class

An interface is a blueprint of a class having static constants and abstract methods. An interface is a reference type in Java. A class that contains public static final data types and declaration of abstract method
Class contains static or non-static data members with methods defined. Interface support multiple inheritance, where as a class does not. Interfaces are implemented by classes whereas sub classes are extended from super class

Interface is a non primitive data type which has static and final data members and prototype of functions ( i.e. functions are not defined )
Difference : Interface supports multiple inheritance whereas a Class does not support multiple Inheritance

This entry was posted in Basic. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *