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