二维数组的理解代码
二维数组
public class ArrayDemo05 {
public static void main(String[] args) {
int[][] array = {{1,2},{1,3}};
System.out.println(array[0][1]);
System.out.println(array.length);
System.out.println(array[0].length);
for (int i = 0; i < array.length; i++) {
for (int j = 0; j < array[i].length; j++) {
System.out.println(array[i][j]);
}
}
}
}