返回列表 發帖

Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯 3 E% N" _+ p% v
  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 tom12102 u( H  W; O% U9 Q' G  g1 d$ O2 ]; P
8 Q. F8 f* S8 I; ]
{
$ h& v8 R8 H$ j! B- a. o* Q+ Q
% I  I$ x  I1 c  |    public static void main(String[]arg)/ V2 e; N2 v0 `5 b
! u* R7 M1 g$ K. ], Q
        {
/ J- V* ~, h2 a* H* e7 }; b  E! \. _6 }8 G$ r
                for(int i=0;i<arg.length;i++)8 |" c: z( B& F* m+ a1 q
' [6 s* X" w& C# h5 C+ d
                {' K# K7 e  B# J4 x" [4 S& t9 S
7 \3 Q# U  J9 m
                        System.out.println(arg[i]);: u. J( T* G. u9 ]1 I5 e
2 S+ w% s' b; B
                }
3 ~  w) B$ h" f+ z+ s) v) X. e( Z
% C' v1 ^. ]# n: S/ G   
* u0 Y2 T3 e9 ]1 |9 n( ]% v' ]- S+ r1 f% U
    }
% O( C( f+ ~  M" ^7 M) |6 c! v3 H; z! i; k6 a3 R( @
+ l% f2 B, M  N. l& z' |
+ ]( G) d2 `) y; `* p' y8 U; `' I, A

# M2 ^' d6 @( @9 S
# S1 K) ]- O3 Y}
人平

TOP

返回列表