返回列表 發帖

Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯 ) r4 d  }! V' _7 f3 ^8 {
  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 tom1210
% y8 A" [! T: Z' D5 p) R6 \
: K4 R7 e) G1 T8 `{4 S. I$ k6 X4 A) r4 I
" _: E; y% }0 P( z* i' s7 V
    public static void main(String[]arg)% L+ K$ t/ n9 e% I2 d
' j- P, V6 P9 }3 c0 U5 x* }" o
        {- r( T0 R; H* e# W# {

+ H% R7 F$ ^5 f                for(int i=0;i<arg.length;i++)# c! R* C* ]! X6 h9 \5 Y

9 ^' e" D/ r. u7 E: o                {3 [9 _) T( [! ]! C; p, |% }

# C1 J/ T* b  J" D7 Q: a. W                        System.out.println(arg[i]);
4 \: y* I# w# r/ y
! e( H/ r* _! W8 ~                }
$ `1 @7 o) ~  H0 t+ f+ h/ J- Z% L8 w* D6 c8 {. a
    , E8 I7 A+ Z: ?

4 K) p' A# q; Q6 ?: H    }
8 |) S8 S8 @+ `5 h  d: L" e4 a' w3 t

' Y7 L+ f% z: s: h& {) g4 |9 @) I+ j! _5 _) E
; A8 k) g4 g0 y2 z  e! o; x$ |4 K

) N* ]1 ]( m5 a2 H% W0 G}
人平

TOP

返回列表