每日代码系列(3)

 1 class O3_1 {
 2   public static void main(String args[ ]) {
 3     int[][] twoD=new int[4][5];
 4     int i,j,k= 0;
 5     for(i=0;i<twoD.length;i++) {
 6       for(j=0;j<twoD[0].length;j++) {
 7         twoD[i][j]=k;
 8         k++;
 9       }
10     }
11     for(i=0;i<twoD.length;i++) {
12       for(j=0;j<twoD[0].length;j++) {
13             System.out.print(twoD[i][j]+" ");
14       }
15       System.out.println();
16     }
17   }
18 }
原文地址:https://www.cnblogs.com/ljydbk/p/14052218.html