
570 CHAPTER 9 Multidimensional Arrays and the ArrayList Class
boolean type are initialized to false, and elements of class types are initial-
ized to null.
9.1.3 Combining the Declaration and Instantiation of
Multidimensional Arrays
Multidimensional arrays, like single-dimensional arrays, can also be instan-
tiated when they are declared. To combine the declaration and instantia-
tion of a two-dimensional array, use this syntax:
datatype [ ][ ] arrayName = new datatype [exp1][exp2];
where exp1 and exp2 are expressions that evaluate to integers and
specify, respectively, the number of rows and columns in the array.
Thus, this statement:
double [][]dailyTemps ...