Board logo

標題: Java 基礎架構與輸出入 [打印本頁]

作者: b790113g    時間: 2011-12-10 11:04     標題: Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯 # }0 \3 i6 `5 _1 v- |: G
  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 處一定要跟檔名相同
作者: TOM    時間: 2011-12-10 11:34

  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. }
複製代碼

作者: johnson    時間: 2011-12-10 11:37

  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. }
複製代碼

作者: lon    時間: 2011-12-10 11:39

  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. }
複製代碼

作者: eric5802    時間: 2011-12-10 11:41

public class tom1210
  b' n* _1 m/ v2 s# P7 m- U: a" U5 B- x1 S9 T- c
{  v+ j; Y" l- w2 a3 t2 _$ o7 P
4 I9 w, @, @- ?0 N
    public static void main(String[]arg)  V) D7 l0 m: @

, h) ]/ n- M5 Y6 {# k" x$ F        {8 m7 X5 a, p+ `. a! z) J, Y# e+ y; s
2 c- n* @+ z3 f( ?& U
                for(int i=0;i<arg.length;i++)
1 m3 `* l9 Z& m7 V! g8 }5 P1 j/ T  E4 l  o2 d- }3 _
                {/ T- l" h$ q% {, Q6 }+ P$ y" Q" E
# i9 w+ w# x/ [- p) h, D
                        System.out.println(arg[i]);% [( H; G* c# Y0 N% K
( a3 E1 M& \* P, c% i. k! T
                }
9 [" ]- R$ C" K. s( d3 R% n, x3 {$ V' M2 K
   
  U; k7 y3 B0 i, @7 X& I3 S7 ?7 R
! i6 S3 Q$ w# v# [, w! z    }
+ ~) Y) S4 z. w. F1 I7 x  \$ k
' X8 i) k* y# C$ ]2 P- t
. W- T- K( R3 ?1 x$ h1 d! F, U8 v% e7 i/ U$ S! H0 J
. r  Z) H5 b) P. q  U4 W4 A) h

% h* U3 s3 h: o$ Z  i4 Q: E8 s9 Z$ {}




歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://seed.istak.org.tw/) Powered by Discuz! 7.2