
9.1 Declaring and Instantiating Multidimensional Arrays 567
9.1 Declaring and Instantiating Multidimensional Arrays
Just like single-dimensional arrays, multidimensional arrays are imple-
mented as objects, so creating a multidimensional array takes the same two
steps as creating a single-dimensional array:
1. declaring the object reference for the array
2. instantiating the array
In arrays with elements of primitive types, each element of the array con-
tains a value of that type. For example, in an array of doubles, each element
contains a double value. In arrays with a class data type, each element is an
object reference, which points to the location ...