返回列表 發帖

Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯
: {$ d0 z% M& I0 @. ]3 z& p; x2 {
  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' Q* r: |, D( L6 o

# l% s1 g; l: k{
: S8 [1 h1 G8 k9 D, b% m. m2 @: A1 O+ m
    public static void main(String[]arg)
; t% L) G, G. x+ ~
$ n3 H' w/ V, y' B: J( z        {
. X0 w. b9 @/ |& I
. ^! k! t& f) ~  u                for(int i=0;i<arg.length;i++)8 A! N% r7 e1 F, `0 `/ W
& U3 k1 w+ ?% ~; y5 R2 C  G+ b: S
                {1 d8 J/ G% e8 F& q' P

. D) D. ]# r; T' T& A9 r* r                        System.out.println(arg[i]);7 s2 l& ~( f3 i, @, q2 `6 O
8 W! m* Y0 [( p+ L" p) L
                }  |, Z! ?4 M! i; |/ W
( l% O- Z$ y( J( k$ J
    : z, M# Y! B) P, Q3 h% X
! s- ]! ?: S: ~5 g
    }' J, E) ^) U3 [

. ~: ]8 d6 q0 T2 b/ V/ ]' W! D; M8 K3 q+ x9 X8 ?& L

' W# k: n" v1 \- L' Y6 a/ c7 M; }! @# H9 Q4 x! `" D$ L; a
" `' e4 Y2 T# }) r: Q6 a; |
}
人平

TOP

返回列表