返回列表 發帖
  1. package www.youtube.com;

  2. public class MAIN {

  3.         public static void main(String[] args) {
  4.                 // TODO 自動產生的方法 Stub
  5.             int a=1;
  6.                 int temp[][][]=new int[2][3][4];      
  7.              for(int i=0;i<2;i++){
  8.                      for(int j=0;j<3;j++){
  9.                              for(int k=0;k<4;k++){
  10.                                      temp[i][j][k]=a;
  11.                          a++;
  12.                              }
  13.                      }
  14.              }
  15.              for(int result[][]:temp)
  16.              {
  17.                 for(int result1[]:result)
  18.                 {
  19.                    for(int result2:result1)
  20.                    {
  21.                    System.out.println(result2);
  22.                    }
  23.                 }         
  24.              }                 
  25.      }
複製代碼

TOP

返回列表