Get array upperbound : Multidimensional Arrays « Collections « Java Tutorial






public class Main {
  public static void main(String args[]) {
    String[][] data = new String[3][4];
    System.out.println("Dimension 1: " + data.length);
    System.out.println("Dimension 2: " + data[0].length);
  }
}
/*
Dimension 1: 3
Dimension 2: 4
*/








9.4.Multidimensional Arrays
9.4.1.Initialize a two-dimensional array in matrix
9.4.2.Arrays of Arrays
9.4.3.Arrays of Arrays in Varying Length
9.4.4.Defining Multidimensional Arrays
9.4.5.Array Of int Arrays
9.4.6.Get array upperbound
9.4.7.To get the number of dimensions
9.4.8.Array Of string Arrays