► |  | How to Design Classes Languages

1 | Professor J Beginner
2 | Professor J Intermediate
3 | Professor J Intermediate + Access
4 | Professor J Advanced
| Index

▼ | 2 | Professor J Intermediate

2.1 | import
2.2 | class
2.3 | interface
2.4 | Field
2.5 | Method
2.6 | Constructor
2.7 | Statement
2.8 | Expression

Version: 4.1.4
top← prev up next →

#### 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.

top← prev up next →