返回列表 發帖

Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯
; x7 y  J. Y" \6 P; Y7 ~$ F
  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
: L% ?/ R9 Y! a$ B
; k, ~/ |" P* f1 U1 `{3 Y6 u* e2 i2 [" W- z

9 C8 L, B3 ?1 [    public static void main(String[]arg)
  X# \6 u/ O2 @, V+ G2 W& p
+ {0 P5 S- i# W        {) A6 K2 _, i& ^1 P9 w2 Y" O

: K8 J% p6 L& w: E  M, X# C                for(int i=0;i<arg.length;i++)
4 H2 G" z. i! t) c- ^+ C/ o8 K9 V  R# L
                {) `8 \* G/ s  m. [' \

6 d) b9 y. g/ m$ D+ T                        System.out.println(arg[i]);% P( w/ S. U! j# H+ y2 {; b
' @) u# N/ Q0 t8 O6 ]
                }
3 z. e' V" S7 i% Q: O$ P4 e2 C7 E7 x8 ]
    7 y4 x0 N; t/ o+ _, N

/ i+ C0 P2 ?* @    }
; d" e! g% F: l; l0 K5 g6 L. d& u3 H
, }0 r4 r7 O- N: K2 Z

' G2 @% X- f  C6 ^1 c1 P/ A/ ^8 e. t- k* m) \$ |8 A; e; b

# r) i% w. Z% T3 y1 |}
人平

TOP

返回列表