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