Java Array multidimensional Arrays reference element

Question

What is the output of the following code?

public class Main {
  public static void main(String[] argv) {
    int[][][] array = { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } };
    System.out.println(array[0][0][0]);
    System.out.println(array[1][1][1]);
  }

}


1
8



PreviousNext

Related