To use an array, we must first create it, by specifying the number of elements it should have.
Creates an array object with dimension elements of type type and returns a reference to the created object. The elements of the array are indexed from 0 to dimension-1 (see later), and each one is initialized to the default value for type.
int a; // a is a variable of type array of integers a = new int; // creation of an array object with 5 elements // of type int associated to the array variable a
After we have created an array object associated to an array variable, it is possible to access the single elements of the collection contained in the array. These elements are initialized to the default value for the type (for integers, it is 0, as illustrated in the figure).