Java provides and supports creating abstract classes and interfaces. Their implementations share the following things:
All methods in the interface are implicitly abstract. Abstract classes can contain both abstract and non-abstract methods.
Class can implement many interfaces, but can inherit only one abstract class
Class to implement an interface, it must implement all methods declared by the interface. However, classes do not implement all methods declared in abstract classes. In this case, classes must be declared abstract.
Abstract classes can implement interfaces without interface methods.
The variables declared in the Java interface are final by default. Abstract classes can contain non-final variables.
The member functions in the Java interface are public by default. Abstract class member functions can be private, protected, or public.
Interfaces are absolutely abstract and cannot be instantiated. Abstract classes cannot be instantiated, but can be called if they contain the main method.
Differences between interfaces and abstract classes-Interview Questions