import java.util.*; //Date w2 s5 x1 R' f) C3 e- H: S
import java.text.*; //SimpleDateFormat1 \$ V7 u: W8 [/ j2 `
, |5 e5 o" Q* h5 O4 N
public class j102{
2 p+ z, V8 Z1 O' s: _/ X# Q; a o% g' t4 p# |, D
public static void main(String arg[]){3 @* M" M* r" ^' O
System.out.println("------------------");. C- g+ x! t) A0 B; m( R
System.out.println(" 當地時間 ");/ j5 U) U' @3 W. A% ]
System.out.println("------------------");
9 z9 a2 C1 {$ Y2 @8 ~2 y0 u Date d = Calendar.getInstance().getTime();
$ v) ^% E0 ^( t( H; S SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/M/d a hh:mm");$ r! I" ^& D$ W/ \
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/M/d a hh:mm:ss");
+ N+ a* I o! p/ E% S* v SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy年M月d日 ahh時mm分ss秒");
/ z1 A3 | I. M6 v7 c SimpleDateFormat sdf4 = new SimpleDateFormat("yyyy年M月d日 E ahh時mm分ss秒 z"); x p- v) B; `, N5 a# H9 ]% X6 f o
System.out.println(sdf1.format(d));, w9 {3 x* C. n9 j, b8 X }
System.out.println(sdf2.format(d));) A2 I6 \. f7 @
System.out.println(sdf3.format(d));
% @( e; t; ~2 I4 ]$ O- Z System.out.println(sdf4.format(d));
M- d& E, T' ?% P1 u' I. x }5 k3 ^* c+ e4 @) e9 f
} |