import java.util.*; //Date
9 k, b/ S- y2 C2 Simport java.text.*; //SimpleDateFormat
% Q* M+ @, v2 E! w( _
7 {! k' [$ f) d2 tpublic class j102{; A+ X! }6 a( R" e$ q6 `
' c( D# C4 F* K w) S6 [ public static void main(String arg[]){" N" d r2 @6 N+ d3 F! M% c
System.out.println("------------------");3 C; ~' Q2 h; F7 a R
System.out.println(" 當地時間拉 ");
) h& o8 |0 S1 p: R System.out.println("------------------");
% J0 x4 W( F( U" r9 a9 v Date d = Calendar.getInstance().getTime();
8 q) n' k) Z/ I8 R' m SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/M/d a hh:mm");
: F0 [+ {1 a4 U$ X SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/M/d a hh:mm:ss");! V, y# L( _& Z* X
SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy年M月d日 ahh時mm分ss秒");
/ T. G7 @1 ^. p SimpleDateFormat sdf4 = new SimpleDateFormat("yyyy年M月d日 E ahh時mm分ss秒 z");. [. _& m. Q+ l. p0 s1 W4 i
System.out.println(sdf1.format(d));
2 v. ^( o [% T/ |4 q System.out.println(sdf2.format(d));
4 u Z* X: s: I6 w, h System.out.println(sdf3.format(d));/ c3 k5 y2 q) v+ k p( K) C; d
System.out.println(sdf4.format(d));
, E9 L$ L7 C3 N7 s }/ d: c- t. s m0 Z$ T% o
} |