public class MyClass {
public static void main(String args[]) {
int[][][] arr = new int[2][3][4];
arr[0][0][0] = 11;
arr[1][1][1] = 32;
arr[0][2][2] = 99;
arr[0][1][3] = 44;
arr[1][2][3] = 55;
for (int depth = 0; depth < 4; depth++) {
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 3; col++) {
System.out.printf("arr[%d][%d][%d] ", row, col, depth);
}
System.out.println();
}
System.out.println();
}
for (int depth = 0; depth < 4; depth++) {
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 3; col++) {
System.out.printf("%d ", arr[row][col][depth]);
}
System.out.println();
}
System.out.println();
}
}
}
/*
run:
arr[0][0][0] arr[0][1][0] arr[0][2][0]
arr[1][0][0] arr[1][1][0] arr[1][2][0]
arr[0][0][1] arr[0][1][1] arr[0][2][1]
arr[1][0][1] arr[1][1][1] arr[1][2][1]
arr[0][0][2] arr[0][1][2] arr[0][2][2]
arr[1][0][2] arr[1][1][2] arr[1][2][2]
arr[0][0][3] arr[0][1][3] arr[0][2][3]
arr[1][0][3] arr[1][1][3] arr[1][2][3]
11 0 0
0 0 0
0 0 0
0 32 0
0 0 99
0 0 0
0 44 0
0 0 55
*/