Interface

As you’ve already learned, objects define their interaction with the outside world through the methods that they expose. Methods form the object’s interface with the outside world;

In its most common form, an interface is a group of related methods with empty bodies.

Human Interface

Human interface can be as follows:

Implementations Of The Interface

To implement this interface, implements keyword must be used in the class declaration. All the methods of the interface must be implemented.

Example 1: French Class

Example 2: English Class

Test The Implementations

Run The Application

Right click to the InterfaceDemo class; select Run As -> Java Application.

Output