返回列表 發帖

Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯 ( |6 b2 @& Q7 M' |2 {
  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 tom12109 r/ T- U* C& \
  s+ C9 B* Y) I+ i0 {
{. U  v9 p0 y6 w! o
% ^+ t4 T4 u4 S
    public static void main(String[]arg)
, E' @2 f. q0 H9 U( U
8 X  b; Y$ D9 W$ a# v  z  b' X        {* f3 c. l0 _" h9 _8 }; P; m

: y* F2 D( f1 d/ h. W                for(int i=0;i<arg.length;i++)& g: j* ~2 t; Z# F0 R
' N2 v; w4 s) G, ^  D+ U# R
                {
- D2 M/ d: x  ^" u9 o
$ x0 b% K: V; a1 y' t1 H                        System.out.println(arg[i]);( Z7 I! c& A! x* b3 U2 U

2 {% }/ d4 F0 i* \% y' S                }, _% ~! g& `- X! Q

; T$ D" d. D. O; d2 H. Y, k0 A   
0 [0 v2 Y. |! w* e' v) K0 z( P: }" W: S9 c! ^! N' ~! r
    }& g8 v4 {3 w; Y# i" T+ }
5 y: T2 s2 D: b3 }( s( ]  t
2 _1 f7 W+ @) K

+ v4 z* i. f7 O, g) @2 q* }. L! [% ]% p* g
4 B! A  h- x( V) x
}
人平

TOP

返回列表