JAVA Syntax Keywords new

 

- Info:

- new keyword is used to create Objects of specified class.

- new keyword should be followed by class name, which is actually call to class constructor which can accept parameters:

Instrument instrument = new Instrument();

- This will call class constructor and return object of that class.