Java - Implements clause

> Procedural Languages > Java

1 - About

To declare a class that implements an interface, you include an implements clause in the class declaration.

A class can implement more than one interface.


3 - Syntax

To implement the interface, you'd use the implements keyword in the class declaration followed by a list of interface separated by a comma-separated.

class MyClass implements MyInterface1 [,MyInterface2,...]  {
   // remainder of this class implemented as before