I'm using Eclipse Luna and i think it's kind of buggy because when i write:
int[][][] a = new int[2][3][4];
System.out.println(a.length+" "+a[0].length+" "+a[1].length);
Eclipse shows me:
2 3 3
but if i use:
int[][][] a = new int[2][3][4];
System.out.println(a.length+" "+a[0].length+" "+a[0][0].length);
Eclipse shows me:
2 3 4
I don't understand why but because of this reason my whole project doesn't work anymore...
a[0]anda[1]? Should they be different?a[0]anda[1]refer to a row in the array. Typically, they should be the same length. This equally applies to a 3D array (although I would hesitate to call this a "row").