previous | start | next

Syntax 2.1: Object Construction

 
new ClassName(parameters)

Example:

  new Rectangle(5, 10, 20, 30)
new Car("BMW 540ti", 2004)

Purpose:

To construct a new object, initialize it with the construction parameters, and return a reference to the constructed object.


previous | start | next