標題:
Java 基礎架構與輸出入
[打印本頁]
作者:
b790113g
時間:
2011-12-10 11:04
標題:
Java 基礎架構與輸出入
本帖最後由 b790113g 於 2011-12-10 11:31 編輯
% p: n; g# M4 n4 K9 l( g( Z1 f0 P
public class d1210 {
public static void main(String[] arg){
for(int i=0;i<arg.length;i++){
System.out.println(arg[i]);
}
}
}
複製代碼
public class d1210 {
public static void main(String[] arg){
try{
System.out.println(arg[0]);
}catch(Exception e){}
try{
System.out.println(arg[1]);
}catch(Exception e){}
}
}
複製代碼
d1210 處一定要跟檔名相同
作者:
TOM
時間:
2011-12-10 11:34
public class tom1210
{
public static void main(String[]arg)
{
for(int i=0;i<arg.length;i++)
{
System.out.println(arg[i]);
}
}
}
複製代碼
作者:
johnson
時間:
2011-12-10 11:37
public class j1210{
public static void main(String[]arg){
for(int i=0;i<arg.length;i++)
{
System.out.println(arg[i]);
}
}
}
複製代碼
作者:
lon
時間:
2011-12-10 11:39
public class j1 {
public static void main(String[] args){
for(int i=0;i<args.length;i++){
System.out.print("你好!");
System.out.println(args[i]+",");
System.out.println("我叫陳彥綸!");
System.out.println("粉高興認識你!");
System.out.println("bye-bye!");
}
}
}
複製代碼
作者:
eric5802
時間:
2011-12-10 11:41
public class tom1210
- f, c% t* X6 X6 M
8 T3 T$ c3 T6 t1 I& {
{
! A* [2 f! q- R
4 |% h( E. H+ i( E2 {
public static void main(String[]arg)
4 o+ O+ y1 P& M/ K- b
6 q! S5 W) D( r1 Z
{
$ R, [5 S# J+ b% z2 t. d
. J/ x, e3 a* j0 n- |% o$ D$ g2 }
for(int i=0;i<arg.length;i++)
" y. _( V' k2 G8 v
( @! ?- y3 x) n2 f7 P
{
4 g* w, S- t8 x2 E$ @: h
. |/ [: T1 [0 P8 D, C9 Z" M
System.out.println(arg[i]);
! R* L/ b" ]1 B" `$ }' J |
9 o' q, y$ h' e( G6 R9 C" O5 }
}
' V8 G& c: x0 F3 d+ h4 b: z- Y$ M g
. o# W% f+ v, z1 h, l7 G: X
& X- t: b1 y% J1 U; Q
3 f8 S* H _, F8 C- v
}
4 R4 p8 a' u0 L' x- f
7 a ]/ g, P7 D, ^" O
/ a. p1 a0 M2 e+ p/ V! v4 P: D
0 x: z- D8 @- ~' q& V: o
- N" Y. w, t, B+ a/ f2 n$ c
. Y% r D$ _6 P8 n3 C& Z
}
歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://istak.org.tw/seed/)
Powered by Discuz! 7.2