跳转至

二维数组

创建数组

int[][] arr = new int [n][m];
int[][] brr = {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}, {11, 12, 13, 14, 15}}; // 3 行 5 列
int[][] crr = {{1, 2, 3, 4, 5}, {6, 7, 8}, {9}}; // 也可以创建非矩形的数组