返回列表 發帖

Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯
* `0 S3 L# P+ M" R- D
  1. public class d1210 {

  2.         public static void main(String[] arg){
  3.        
  4.                 for(int i=0;i<arg.length;i++){
  5.                
  6.                         System.out.println(arg[i]);
  7.                        
  8.                 }
  9.                
  10.         }

  11. }
複製代碼
  1. public class d1210 {

  2.         public static void main(String[] arg){
  3.        
  4.                 try{
  5.                         System.out.println(arg[0]);
  6.                 }catch(Exception e){}
  7.                
  8.                 try{
  9.                         System.out.println(arg[1]);
  10.                 }catch(Exception e){}
  11.                
  12.         }

  13. }
複製代碼
d1210 處一定要跟檔名相同

  1. public class tom1210
  2. {
  3.     public static void main(String[]arg)
  4.         {
  5.                 for(int i=0;i<arg.length;i++)
  6.                 {
  7.                         System.out.println(arg[i]);
  8.                 }
  9.    
  10.     }


  11. }
複製代碼
水桶小鄭,鯰魚

TOP

  1. public class j1210{
  2.     public static void main(String[]arg){
  3.        
  4.         for(int i=0;i<arg.length;i++)
  5.         {
  6.        
  7.         System.out.println(arg[i]);
  8.        
  9.         }
  10.        
  11.        
  12.     }
  13. }
複製代碼
小雲雀

TOP

  1. public class j1 {
  2. public static void main(String[] args){
  3.         for(int i=0;i<args.length;i++){
  4.                 System.out.print("你好!");
  5.                 System.out.println(args[i]+",");
  6.                 System.out.println("我叫陳彥綸!");
  7.                 System.out.println("粉高興認識你!");
  8.                 System.out.println("bye-bye!");
  9.         }
  10. }
  11. }
複製代碼
陳彥綸

TOP

public class tom12106 p$ T, G5 J- @& r6 M! m

) M  Y3 m& ^1 i! [{
1 j( g$ k6 J/ x4 O: {( D1 a* h' P: a" l# k5 j
    public static void main(String[]arg)4 t; i" q$ J2 X6 p( d" G0 G
$ }+ ?& I" L* a1 _
        {6 C1 e- p9 I. l, c

8 M! a" s! u' S: u$ I' ?% |                for(int i=0;i<arg.length;i++); q5 f( ~. A- K- F" ]" F# l+ p

3 P: `( Q# Q, x7 z7 o                {  |' h. t# t1 I3 }/ Q& f
$ Y, C1 c* Y" Z5 Q& l
                        System.out.println(arg[i]);
/ _; \- {4 R* x9 J/ Q5 {, j* \0 n7 f
                }
# E" K9 a& F  k2 _5 f" K, k& V- ?& b& ~. F+ L8 {
    # d: @4 U% \% r/ P6 G
$ f4 Y- @# s$ y( e
    }
1 }+ |& c/ d. t7 W, H( p2 x1 c7 A- F" q- M

4 N% t$ c  ]2 w; T* F( y3 K: ^! F5 Y% U3 M: U
5 x& F. ?7 v  Q: X; c6 t

! a# }+ ?8 n# B# D8 _7 h}
人平

TOP

返回列表