返回列表 發帖

Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯
% z2 h2 t$ S4 [
  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
" ^+ h2 T4 Q5 u; h: A8 s' E1 h9 j2 w, R, e+ O7 j# e1 [1 ~
{
" U& k( c* S# x/ W# e$ v! L# V, k( _% I
    public static void main(String[]arg)
9 ]  c& w! s# D% ~
* [2 C5 h- v; ~- Y: r. ]% y+ i        {$ S# q) h# p0 j5 r7 V3 C

- n! g+ y1 j5 D+ [$ s                for(int i=0;i<arg.length;i++), Q6 h5 e& E' X
1 |6 V, B; F3 h9 Q# G: r1 E
                {
/ u6 k; A4 M6 y0 l0 H; o
' p/ E+ P0 ^: D/ F                        System.out.println(arg[i]);9 C& h* S$ N3 q" _" K6 t
/ ]% D/ w) A& I* X
                }6 w9 v; Z  l# N2 d' K# a" V
& E7 S" ~) D* c& l1 D' p7 o( |
   
' ^: x9 @0 H0 {2 K6 c$ |, R2 j
/ r9 a! p6 d3 C! x- A9 Q4 t    }
5 \0 ^2 t" P% M' B; B* Y( z! M9 o# t8 E) e0 Q9 Y. V
; k: X$ O- C1 [7 N6 j9 N2 B! ?0 k
$ \9 _5 J( U9 _4 J6 _+ H( _: |0 D$ \
  z& c" R2 S' b# e: A+ Z5 {( y+ j

% P. O1 K& e9 h}
人平

TOP

返回列表