import java.util.*; //Date7 z& B! @. ]# f* ]
import java.text.*; //SimpleDateFormat0 {) i( \4 e6 G, G5 q0 O
) K. w' V {/ J. N7 C4 m# cpublic class j102{
L. @5 a! N* s& J
: Y% G. w( }4 T$ x) Z0 ~! U% D. v public static void main(String arg[]){( |# |$ ]4 `7 X! c
System.out.println("------------------");' g3 R0 v2 g/ Q; A, \7 [$ {: o
System.out.println(" 當地時間拉 ");: z7 u( m5 m9 I4 |0 b
System.out.println("------------------");
8 Y% g- F( W9 h0 F8 x& \6 G" i6 h/ w Date d = Calendar.getInstance().getTime();) P( P4 D! b( \( z9 @& C
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/M/d a hh:mm");$ K; f6 ~% r" r |& s% _
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/M/d a hh:mm:ss");# z2 Y, p5 O: Z( G) S% R1 m7 c
SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy年M月d日 ahh時mm分ss秒");
" h/ p, s$ A+ k5 q& g; [! O) } SimpleDateFormat sdf4 = new SimpleDateFormat("yyyy年M月d日 E ahh時mm分ss秒 z");# A" ]1 D, w: T1 t2 ~2 W* r
System.out.println(sdf1.format(d));
* y) H8 ^. W, c& }7 ^( Q$ p0 Y System.out.println(sdf2.format(d));
' }) C$ |) r( O3 D% t System.out.println(sdf3.format(d));
6 j7 v1 o+ k/ p System.out.println(sdf4.format(d));: d) R) @' x& G8 K0 a. A" r
}0 C% I7 i( ~+ n: x& Z: ]8 s
} |