lib.Interfaces

Interfaces are objects that specify (document) the external behavior of objects that “provide” them. An interface specifies behavior through method definitions that specify functions and their signatures.

Let's look at an example of an interface and a class implementing the interface:

We can now check whether the promised interface methods are implemented by the class:

References