Board logo

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

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

本帖最後由 b790113g 於 2011-12-10 11:31 編輯
% p: n; g# M4 n4 K9 l( g( Z1 f0 P
  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- f, c% t* X6 X6 M
8 T3 T$ c3 T6 t1 I& {
{
! A* [2 f! q- R4 |% h( E. H+ i( E2 {
    public static void main(String[]arg)4 o+ O+ y1 P& M/ K- b
6 q! S5 W) D( r1 Z
        {$ R, [5 S# J+ b% z2 t. d

. J/ x, e3 a* j0 n- |% o$ D$ g2 }                for(int i=0;i<arg.length;i++)
" y. _( V' k2 G8 v( @! ?- y3 x) n2 f7 P
                {
4 g* w, S- t8 x2 E$ @: h
. |/ [: T1 [0 P8 D, C9 Z" M                        System.out.println(arg[i]);
! R* L/ b" ]1 B" `$ }' J  |
9 o' q, y$ h' e( G6 R9 C" O5 }                }' V8 G& c: x0 F3 d+ h4 b: z- Y$ M  g
. o# W% f+ v, z1 h, l7 G: X
   
& X- t: b1 y% J1 U; Q3 f8 S* H  _, F8 C- v
    }4 R4 p8 a' u0 L' x- f
7 a  ]/ g, P7 D, ^" O
/ a. p1 a0 M2 e+ p/ V! v4 P: D

0 x: z- D8 @- ~' q& V: o
- N" Y. w, t, B+ a/ f2 n$ c. Y% r  D$ _6 P8 n3 C& Z
}




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