Q:

Java: length of multidimensional arrays

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:

These outputs are perfectly correct. You have a 3-dimensional array of length 2 x 3 x 4 so for all valid indexes i, j :

a.length is 2
a[i].length is 3
a[i][j].length is 4

