import java.util.*; //Date" x0 S: R1 z, t! \% M0 t! j
import java.text.*; //SimpleDateFormat% }% \2 \ E+ w) c2 s6 Q
5 D, q* T1 f# |( L5 ~1 N$ q" ^public class j102{' h: y8 b7 P$ v2 ^" c
5 A) p. f/ e M: R$ h3 A
public static void main(String arg[]){
$ g$ x0 A3 }. \9 S! p System.out.println("------------------");& F* g3 Y) h' z+ e, i4 [
System.out.println(" 當地時間拉 ");# X8 M; q0 a+ @" I& a
System.out.println("------------------");/ T2 k- `( v/ G8 a3 d
Date d = Calendar.getInstance().getTime();2 |2 |. Z+ G' b# b8 q
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/M/d a hh:mm");
* I9 K h" i7 U+ c SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/M/d a hh:mm:ss");
* m- K j5 b! s/ Y' O1 u- @ SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy年M月d日 ahh時mm分ss秒");
% _0 e8 @. x7 p/ M SimpleDateFormat sdf4 = new SimpleDateFormat("yyyy年M月d日 E ahh時mm分ss秒 z");
. U& I# [2 x+ v: _ System.out.println(sdf1.format(d));
0 M8 o/ X' @9 T ^: W7 c System.out.println(sdf2.format(d));* f& B# F0 P& Q" |. }1 ]
System.out.println(sdf3.format(d));! E) K! u, s2 B. r0 L
System.out.println(sdf4.format(d));: l. N2 N! @( ]3 p1 k) O+ |
}; N3 U) F& U- @% Y
} |