previous | start | next

Syntax 11.1: Defining an Interface

 
public interface InterfaceName
{
   // method signatures
}

Example:

 
public interface Measurable
{
   double getMeasure();
}

Purpose:

To define an interface and its method signatures. The methods are automatically public.


previous | start | next