返回列表 發帖

Java 基礎架構與輸出入

本帖最後由 b790113g 於 2011-12-10 11:31 編輯
& x# U+ [  e( L4 F9 A. R; ?
  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
  E4 s+ K6 x) i- K: e
  j9 J- E: c  m. b" F& Q{
0 c$ b! J% `( D% U0 @/ n
: ?0 r+ [8 s7 G: j1 n9 j    public static void main(String[]arg)
- c. T" Z) G, K
0 G9 f. d: E. Z6 R! C        {0 g+ r8 B5 J8 j+ [. M6 _! l7 }! u
. X  ^: B  R6 U
                for(int i=0;i<arg.length;i++)+ n7 Y0 F) E, o; s9 @6 L; Z% x
) Q) }0 z& Y8 |, f) {
                {6 f9 A0 M" m" T7 X
- q1 l5 c, v/ o; ~1 ?
                        System.out.println(arg[i]);
7 o) d# X- Y; `1 ]0 h
  ]; S; w3 G7 r; R                }# P. J  Q; R) g
% e, f9 i5 H: r$ q8 ?0 A3 a
   
( K) M9 A- n, g$ W9 R3 u+ l3 C. d' r' `: \
    }
# @  m9 ]6 q' {/ X  J
6 U+ Y4 M1 P: o& @* ?+ P6 Z3 g* l- O! t* E0 h, t1 I

! P! l: m3 r3 I; F: D" _. B! J$ M3 v; l& o0 D- h; e/ v

* v+ Y0 w" v) x" \) S+ b" ?6 ]( z6 F( f$ g}
人平

TOP

返回列表