boolean[][] array = new boolean[3][5];
Creates an array of three arrays (5 boolean each). In Java, multidimensional arrays are just arrays of arrays:
array.length
gives the length of the "external" array (in this case 3).
array[0].length
gives the length of the first "internal" array (in this case 5).
array[1].length
and
array[2].length
will also give you 5, since in this case all three "internal" arrays array[0] , array[1] and array[2] are the same length.
trutheality
source share