Abstract vs Interface classes

A. INTERFACE : In every sector have some guidelines or conventions that must be followed by the players : Standards are Interfaces.
In java, an interface is a reference type that contains only constants (does not need to implement or declare the variables), method signatures(no braces), default methods, static methods, and nested types.
1. Implemented by classes (must implement all the methods)(A Java class can also implement multiple java interfaces)
2. Extended (inherited) by other Interfaces.
3. Cannot instantiate an interface (does not contain any constructors)

B. INHERITANCE : characteristics are inherited from ancestor class (Object class is the parent class)
1. Extended (inherited) from parent class (possible to refer a subclass as an instance of one of its super class)
2. Subclass can override or redefine methods defined in the super class
3. Constructors of the super-class is not inherited by it’s subclass. (Subclasses can still call the constructors in the super class using the super())

C. POLYMORPHISM : ability of an object to take on many forms by method overriding and method overloading.
1. Method Overloading: Can define two or more methods of same name in a class, provided argument list or parameters are different.
2. Method Overriding: child class method overrides the parent class method without even touching the source code of the base class!

D. ABSTRACT CLASS : a class which cannot be instantiated. Purpose of an abstract class is to function as a Base (to extend) for subclasses only. (public abstract class class name).
1. Abstract class : A base class for subclasses. An abstract class can have a mixture of abstract and non-abstract methods.
2. Abstract Method: Has no implementation. It just has a method signature. If a class has abstract method then that class also should be abstract.
3. Subclasses of an abstract class must implement (override) all abstract methods of its abstract super-class. The non-abstract methods of the super class are just inherited as they are (can be overridden as well).

Interfaces are provide a standards to make several independent implementation classes. Abstract classes are used as base classes for extension by subclass.