- package www.youtube.com;
- public class MAIN {
- public static void main(String[] args) {
- // TODO 自動產生的方法 Stub
- int a=1;
- int temp[][][]=new int[2][3][4];
- for(int i=0;i<2;i++){
- for(int j=0;j<3;j++){
- for(int k=0;k<4;k++){
- temp[i][j][k]=a;
- a++;
- }
- }
- }
- for(int result[][]:temp)
- {
- for(int result1[]:result)
- {
- for(int result2:result1)
- {
- System.out.println(result2);
- }
- }
- }
- }
複製代碼 |