# interface Java Keyword

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();
      }

## Remarks

- Any class that implements an interface must provide implementations for all methods in that interface.

- A single class may implement multiple interfaces.

Related Topics

class Java Keyword