O'Reilly logo

The Java® Language Specification, Java SE 7 Edition, Fourth Edition by Alex Buckley, Gilad Bracha, Guy Steele, Bill Joy, James Gosling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

15.9. Class Instance Creation Expressions

A class instance creation expression is used to create new objects that are instances of classes.

ClassInstanceCreationExpression:    new TypeArgumentsopt TypeDeclSpecifier TypeArgumentsOrDiamondopt                                                           ( ArgumentListopt ) ClassBodyopt    Primary . new TypeArgumentsopt Identifier TypeArgumentsOrDiamondopt                                                           ( ArgumentListopt ) ClassBodyoptTypeArgumentsOrDiamond:    TypeArguments    <>ArgumentList:    Expression    ArgumentList , Expression

A class instance creation expression specifies a class to be instantiated, possibly followed by type arguments (§4.5.1) or a diamond (“<>”) if the class being ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required