Finding out the dimensions and length of an (multi-dimensional) array

For a single-dimensional array:

      String []arr = new String[10];
      System.out.println(arr.length);   	// 10

For a multi-dimensional array:

      int [][][]arr = { { { 1, 2, 3, 4 }, { 2}, {3, 4} } };
 
      System.out.println(arr.length); 		// 1
      System.out.println(arr[0].length);	// 3
      System.out.println(arr[0][0].length); 	// 4