► |  | How to Design Classes Languages

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

▼ | 4 | Professor J Advanced

4.1 | package
4.2 | import
4.3 | class
4.4 | interface
4.5 | Modifiers
4.6 | Field
4.7 | Method
4.8 | Constructor
4.9 | Statement
4.10 | Array Init
4.11 | Expression

Version: 4.1.4
top← prev up next →

#### 4.4`` 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 →