Does Java support multi-dimensional Arrays?


No, Java does not support multi-dimensional arrays.

  • Java supports arrays of arrays.
  • In Java, a two-dimensional array is nothing but, an array of one-dimensional arrays.

                  int[][] arr = new int[2][4];

  • The expression arr[i] selects the one-dimensional array and the expression arr[i][j] selects the element from that array.
  • Array indices in each dimension range from zero to "length". Where length is the array length in the given dimension. 
  • There is no array assignment operator. The number of dimensions and the size of each dimension is fixed once the array has been allocated.

Updated on: 30-Jul-2019

390 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements