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

New expressions

Syntax

    FullNewExpression :
      new FullNewSubexpression Arguments
    FullNewSubexpression :
      PrimaryExpression
      FullNewExpression
      FullNewSubexpression PropertyOperator
      SuperExpression PropertyOperator
    ShortNewExpression :
      new ShortNewSubexpression
    ShortNewSubexpression :
      FullNewSubexpression
      ShortNewExpression

Semantics

The new expression is specialized for the Array and Map types. If the class of new expression is untyped and it’s an Array or Map, it uses * for all expected type parameters.