New

new

It acts of a unary operator who creates a new object or a new table.

To create a new object, the word new must be followed of a method which is a manufacturer. For example, one will be able to have:

   Twinned obj; 
   ... 
   obj = new MaClasse(5, "hello");

if however the class Twinned a manufacturer has who has two parameters, an entirety and a character string.

To create a new table, one can for example write:

   String[ ] arguments = new String[10 ];
   or: 
   int[][ ] uneMatrice = new int[4][5 ];
   or: 
   int[][ ] quatreLignes = new int[4][ ];

to see "Learning Java - Course and exercises" by Irene Charon on the site "http://www.inf.enst.Fr%7Echaron/coursJava/index.HTML"

 

  > French to English > fr.wikipedia.org (Machine translated into English)