import java.util.*; //Date
! \9 N7 N o, b4 R6 E" _* ?6 pimport java.text.*; //SimpleDateFormat
/ x; P j' f4 V6 U" a) B* o* P
& k9 P' o; ^ m. y$ `2 L( Ipublic class j102{/ U# l5 ~; ]0 d7 c; Q" Y' p+ L
) \6 z5 n4 u* F- x$ a+ I0 Z5 | public static void main(String arg[]){! r4 W6 F, `% f2 g8 t" v9 Y2 A/ s
System.out.println("------------------");
9 ~ H" p0 V9 w6 f System.out.println(" 當地時間拉 ");# F- a% j5 y2 E/ y+ A& x# ]* D0 K
System.out.println("------------------");- r5 z, f" o: W) j# S
Date d = Calendar.getInstance().getTime();: P+ M# z' B: S! R
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/M/d a hh:mm");4 ?1 Y2 W! J# d4 X: I
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/M/d a hh:mm:ss");
, F4 s7 B$ L# ]. Y- B8 f SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy年M月d日 ahh時mm分ss秒");. e# c& g* l5 ~+ M9 d- z# w# o
SimpleDateFormat sdf4 = new SimpleDateFormat("yyyy年M月d日 E ahh時mm分ss秒 z");
1 E4 O' P$ z, y4 g/ R( _0 X& W System.out.println(sdf1.format(d));
0 A- _) ~: j* K' w5 ^$ [8 [ System.out.println(sdf2.format(d));; p: o6 k$ ~% E0 K
System.out.println(sdf3.format(d));, q7 e) ?! U% m, B& U8 V
System.out.println(sdf4.format(d));" R; `, N. g' r& p# @+ S& z
}
. |9 y' `) x. i# K0 k} |