Arrays occupy space in memory. Since they’re objects, they’re typically created with keyword
new. To create an array object, you specify the type and the number of array elements as part of an array-creation expression that uses keyword
new. Such an expression returns a reference that can be stored in an array variable. The following declaration and array-creation expression create an array object containing 12
int elements and store the array’s reference in variable
int c = new int[ 12 ];
This expression can be used to create the array shown in Fig. 8.1 (but not the initial values in the array—we’ll show how to initialize the elements of an array momentarily). This task also can be performed as follows: ...