返回列表 發帖

Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯 9 P# L2 t6 m* E, O8 ~. C1 X% i
  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: A+ E; ~+ ]. R0 s$ I% L$ D; e8 z/ |

* {9 i* t0 j1 m' J, y% {{
: _/ o4 r9 a9 e' m8 d
3 S% B8 U8 t9 P1 M/ n    public static void main(String[]arg)- Z' g- Y* R' Z, s' S& i
+ L6 c5 n  ^, O% x3 f
        {
- c& C" z1 R! j' u6 K% ?9 S+ W) z: @' U( e
                for(int i=0;i<arg.length;i++)6 W# k6 |/ Q& ~) G- l/ I' ~; g7 [
0 O+ ~6 i/ [2 h% ]' u8 ?
                {
* b3 e' \5 w9 C+ \; Q
: D  l  O. s; X/ ~1 z9 N                        System.out.println(arg[i]);( S2 i, v' r4 I9 t
4 V2 A1 }! ^. }  }
                }
4 k% K  s: b3 [" x% y$ ~' ^* h% T( e5 N7 L+ r
    9 z) R& |. ?  r" P

! H4 g$ f) r, L7 r    }
% E+ M, y( O3 [, Z
( E* k5 ~1 V: }  h: }+ k8 R1 |$ i- k4 m

8 y/ Y/ J' Z/ i1 W+ h
: |, q0 ?6 N1 W/ }$ s( C: Y
, w( ~! r, S8 a% n$ j- v" P}
人平

TOP

返回列表