- public class Ch38
- {
- public static void main(String args[])
- {
- String a[]={"A","B","C","D"};
- String b[]=new String[]{"1","2","3","4"};
- String c[];
- c=new String[]{"ㄅ","ㄆ","ㄇ","ㄈ"};
- System.out.print("陣列a: ");
- for(int i=0; i<4; i++)
- System.out.print(a[i]+" ");
- System.out.println();
- System.out.print("陣列b: ");
- for(int i=0; i<4; i++)
- System.out.print(b[i]+" ");
- System.out.println();
- System.out.print("陣列c: ");
- for(int i=0; i<4; i++)
- System.out.print(c[i]+" ");
- System.out.println();
- }
- }
複製代碼 |