1.二维数组的长度
int[][] acc = new int[2][4]; System.out.println(acc.length); //2 System.out.println(acc[1].length); //4
2.二维数组遍历
int[][] acc = new int[][]{{1, 2, 3}, {3, 2, 1}}; for (int i = 0; i < acc.length; i++) { for (int j = 0; j < acc[i].length; j++) { System.out.print(acc[i][j] + ","); } System.out.println(); }