In the blackberry documentation, they say that an array takes one object handle:
int[] array; // 1 object handle
How many handles does an array of arrays take?
int[][] array = new int[4][2]; // how many handles?
I can’t figure out if it would be a single one since, after all, the array can be construed as a single piece of memory or is it multiples (5 in this case) because there would be one per element in the first-level array?
Java doesn’t have multidimensional arrays, as you’ve found out. It has array of arrays.
Given this declaration:
There are 4
int[]arrays, each having2 intelements.Consequently, this means that
arrayis also anObject[].Just because you have an
int[][], doesn’t mean that eachint[]is distinct, of course.Now there is only one
int[], and eachweird[i]shares this reference.