14 Interfaces
An interface is a group of related methods with empty bodies. In other words, it is a collection of abstract methods. An interface is not a class. A class implements an interface to inherit the abstract method of the interface. The following code shows an interface Cars, that has method make() and price(). The following steps show class Nissan which implements the Cars interface and define its abstract method make() and price(). 14.1 | Create a new class in Eclipse 1. Create a new class in Eclipse as defined in the previous post. 2. Provide reference of Cars interface as…