Interface | Abstract Class |
Interface can have only abstract methods. | Abstract class can have abstract and non-abstract methods. |
Supports multiple inheritance. | Does not support multiple inheritance. |
The 'interface' keyword is used to declare interface. | The 'abstract' keyword is used to declare abstract class. |
Cannot provide the implementation of abstract class. | Can provide the implementation of interface. |
It cannot have static methods, main method or constructor. | It can have static methods, main method and constructor. |
It has only static and final variables. | It can have final, non-final, static and non-static variables. |
Code is not allowed. | Contains the code in method bodies. |
Example: public interface Drawable { void draw(); } | Example: public abstract class GraphicObject { abstract void draw(); } |