- public class junior01 {
- public static void main(String args[]){
- String a[]=new String[]{"春","夏","秋","冬"};
- String ab[]=new String[]{"甲","乙","丙","丁"};
- int c[]=new int[]{1,2,3,4};
- String ac[]=new String[]{"A","B","C","D"};
- System.out.print("陣列a:");
- for (int i = 0;i<=3;i+=1)
- System.out.print(a[i]);
- System.out.println();
- System.out.print("陣列ab:");
- for (int i = 0;i<=3;i+=1)
- System.out.print(ab[i]);
- System.out.println();
- System.out.print("陣列c:");
- for (int i = 0;i<=3;i+=1)
- System.out.print(c[i]);
- System.out.println();
- System.out.print("陣列ac:");
- for (int i = 0;i<=3;i+=1)
- System.out.print(ac[i]);
-
- }
- }
複製代碼 |