返回列表 發帖
[code][/code]

TOP

  1. public class Ch37
  2. {
  3.     public static void main(String args[])
  4.     {
  5.        String a[]={"UP","DOWN","LEFT","RIGHT"};
  6.        String b[]=new String[]{"春","夏","秋","東"};
  7.        String c[];
  8.        c=new String[]{"東","南","西","北"};
  9.        System.out.print("陣列a: ");
  10.        for(int i=0; i<4; i++)
  11.            System.out.print(a[i]+" ");
  12.        System.out.println();
  13.        System.out.print("陣列b: ");
  14.        for(int i=0; i<4; i++)
  15.            System.out.print(b[i]+" ");
  16.        System.out.println();
  17.        System.out.print("陣列c: ");
  18.        for(int i=0; i<4; i++)
  19.            System.out.print(c[i]+" ");
  20.        System.out.println();
  21.     }
  22. }
複製代碼

TOP

返回列表