java二维数组长度
2021-03-07 本文已影响0人
笔记本65
int[][] grid =new int[][]{{1, 2, 3}, {4, 5, 6}};
System.out.println(grid.length +" " + grid[0].length +" " + grid[1][2]);
输出:

int[][] grid =new int[][]{{1, 2, 3}, {4, 5, 6}};
System.out.println(grid.length +" " + grid[0].length +" " + grid[1][2]);
输出: