返回列表 發帖

Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯 5 i. W0 e$ Y, |, _8 K
  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
* {5 p' B( W' w& J/ |# ?% O1 r  H% q
- [7 r! z: {6 E' {6 R{) {1 q3 g2 G  y
! N- q6 |1 B4 ~" f. H
    public static void main(String[]arg): W. {0 U' n6 ^5 A

- E. d  @& T6 e8 v! {        {, W; [3 m" Y4 B1 N6 n

/ k. ^& }0 l, j$ X                for(int i=0;i<arg.length;i++)  @$ _! [. ^& ^& [$ Q' k0 K

4 c8 t- _- u3 l: h* ]0 H                {( C# c7 S' H* W* a* p
9 D$ [+ ?, O  s5 U
                        System.out.println(arg[i]);
# @; a/ v  Y3 R/ \6 X5 r' D  O8 F& ]8 F+ S1 {2 C3 \
                }
7 }! k$ v& W$ H* t8 ~5 M
; e/ E& J+ Q3 B0 K, P) h% H    ! g5 I8 e4 X1 J
& t0 \* n8 k. j6 K9 X
    }! P4 R6 R* p* y4 K
% i+ k7 {- m2 F7 v0 ]9 L
6 Q3 ]5 ^+ w0 c( w" v
/ @  J% s$ T. c

& h6 E  N# @1 @  c' }
; [% V, d" Q3 y9 @9 I! a+ @$ `( N( @}
人平

TOP

返回列表