One can assign an array with an arbitrary number of dimensions
to a multi-dimensional array (e.g.,
int a = new int; is ok).
The rank of an array is not part of its type
The rank of an array is part of its type
CorrectionHere is what's right.
The type of an array includes the rank
(the number of dimensions, the depth of array nesting).
E.g., the type of a two-dimensional array of
is different from the type of a three-dimensional array of
int are different types).
Thus, the following is illegal:
int a = new int; a = new int; // type error // a has type int // new int has type int