The interface keyword is used to declare a new Java interface, which is a collection of methods.
Interfaces are a powerful feature of the Java language. Any class may declare that it implements one or more
interfaces, meaining it implements all of the methods defined in those interfaces.
Examples
public interface IPolygon
{
public float getArea();
public int getNumberOfSides();
public int getCircumference();
}
Comments
Post a Comment