|
public class Exercise2 {
public static void main(String[] args) {
int size1 = 2;
int size2 = 10;
int[][] array = new int[size2][size1];
for (int i = 0; i < size2; i++) {
for (int j = 0; j < size1; j++) {
array[j] = 1;
}
}
for (int i = 0; i < size2; i++) {
for (int j = 0; j < size1; j++) {
System.out.println("["+i+"]"+"["+j+"]="+array[j]);
}
}
}
}
求教这段在程序里是怎么起的作用,求具体思路 |
|