返回列表 發帖

Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯 2 C# Y+ \2 O* h5 q0 O, X' D
  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
* {7 O/ z0 L! B& G" ?; E' q! u, I# K  t. r  |0 b% M
{
# h# Q2 |" [* `8 [* E3 V" |8 d" `. B$ \- c* r' {% ^; Q- @! _9 N
    public static void main(String[]arg)9 r7 K  L% t; B9 H

7 @: b  V& A1 b' E) i( C* [* c! d        {
( X2 b1 \, N. D9 X* r9 P" Y$ e6 ^. [. D6 m0 E; V) L4 L
                for(int i=0;i<arg.length;i++)8 p3 o# P3 K( K0 P5 q0 _

3 b! U6 L; ~1 r" l) L; g& Y. H                {% {# y, Z* w+ O7 K! u8 n" Q
+ D$ L9 T: }$ e. V0 P
                        System.out.println(arg[i]);1 w9 l- C8 Z: Z9 o5 Y7 z7 H
* n+ @7 X$ V% ^# Y5 j# d
                }
7 S) U" q+ H6 Q3 p
, S" r; V, {* ?8 ~* b   
( b- L: B; P3 d# K& f  {# h8 E1 W/ z: {! r! g& q
    }
9 W' ?  i( G; c5 B
* q$ Y6 u/ j* z+ P4 U% H  t% j6 L6 x7 {, |- e# u/ b
! |$ c1 _$ X% n! Y

( ~6 h5 h/ ?5 B% j; E% Q/ ]. g9 L
# o( n, b% a: K/ u/ c}
人平

TOP

返回列表