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]);
输出:
本文标题:java二维数组长度
本文链接:https://www.haomeiwen.com/subject/wmhyqltx.html
网友评论