Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Class definition

Syntax

Nested classes are allowed; however, classes are only allowed in package blocks and top-level region. When nested in another class, contributes a static property.

    ClassDefinition :
      class IdentifierName TypeParametersopt Inheritance Block
    TypeParameters :
      . < TypeParameterList GenericGreaterThan
    TypeParameterList :
      TypeParameter
      TypeParameterList , TypeParameter
    TypeParameter :
      Identifier

Class inheritance

Syntax

    Inheritance :
      «empty»
      extends TypeExpression
      implements TypeExpressionList
      extends TypeExpression implements TypeExpressionList