What is an Interface?

An interface is a description of a set of methods that conforming implementing classes must have.

Note:

• You can’t mark an interface as final.

• Interface variables must be static.

• An Interface cannot extend anything but another interfaces.

  • An interface is a specification of method prototypes, before we proceed further, written in the interface without mehtod bodies. *An interface will have 0 or more abstract methods which are all public and abstract by default. * An interface can have variables which are public static and final by default. This means all the variables of the interface are constants.

It’s an abstract class with public abstract methods all of which must be implemented in the inherited classes.