集册 Java实例教程 多维数组

多维数组

欢马劈雪     最近更新时间:2020-01-02 10:19:05

412
提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
数组可以是多维的。

public class Main {

  public static void main(String[] arguments) {/** 时 代 J a v a - nowjava.com 提 供 **/

    int[][][] cen = new int[100][52][7];

    System.out.println("Elements in 1st dimension: " + cen.length);

    System.out.println("Elements in 2nd dimension: " + cen[0].length);

    System.out.println("Elements in 3rd dimension: " + cen[0][0].length);


  }

}