Interfaces are Java constructs similar to classes that do not contain any functioning code. Interfaces are used to define the general design for a class without
getting into the details of an implementation.
The idea behind interfaces is that you can use them to define the general make-up of a type of class and then apply it to create the classes themselves.
Following is an example of a simple interface:
Although interfaces primarily consist of method declarations, it is possible to declare member variables in them as well.
However, any member variable declared in an interface is implicitly made
The following link discusses a class that implements two interfaces where the variables and methods of the interface are the same.
Click the Exercise link below to create an interface.
Java Interfaces - Exercise