2.3 interface🔗ℹ

  • interface Id {Signature ...}

    Creates an interface named Id that specifies a set of method signatures for classes to implement.

  • interface Id extends Id ,Id ... {Signature ...}

    Creates an interface named Id that specifies a set of method signatures for classes to implement, and inherits the method signatures of the interfaces specified in the extends list.

MethodReturn Id (Type Id ,...) ; 

The signature specifies a method named Id, expecting the listed arguments. All classes implementing the (scheme interface) must contain a method with the same name, return type, and argument types. A method that does not return a value uses the void designation instead of a Type.

abstract MethodReturn Id (Type Id ,...) ; 

A signature may be declared abstract. This does not impact the method behavior; all signatures are by default abstract.