返回列表 發帖

Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯 & ?8 E8 D+ Z) F2 |- ~( L
  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; g: i" L( B. Z) P( G9 ?

  z2 _; C# K% b2 l* ^{
' K: b5 o8 z1 k+ \$ m3 P5 V5 F1 `  e8 f( N) ?9 B
    public static void main(String[]arg)5 |; s0 ]1 ^3 G  U( U
3 C+ a& V8 F( d! [( N# b2 z8 I
        {7 w/ H+ k# A! Q+ D* Q; B  |
& Y' {' g- S* l  b  p& w- |
                for(int i=0;i<arg.length;i++)
+ l( i" H/ d- e$ u1 {5 U6 @- v% \* U
                {
! |+ j* X' ?6 P8 _. }
2 h5 [3 s! f- K; G1 f                        System.out.println(arg[i]);8 _) U/ T# T$ n2 i

+ L& M# y0 @4 \7 k7 F                }) {' z$ x  @9 N& o
8 a# T1 Y& G$ O. L3 V: n
    * b2 U  A1 H2 w' S7 R0 [
2 t& c& g/ h5 d
    }" T% R$ s- W1 |$ a0 c6 W( b  d9 `
. |& _6 C$ b% R! [

9 @- a; d  L9 F" M( X( ?. L: a$ q# P' s, |

% z; ^1 L7 L( M+ q) x( B- w  o( [0 x3 |3 f) H& V  n( t
}
人平

TOP

返回列表