import java.util.*; //Date% [" U/ s/ Z Y1 Z$ |9 f
import java.text.*; //SimpleDateFormat5 f% Q4 z$ D D7 Y. s
! S G& d1 r: S. g9 W
public class j102{+ m% S: U/ y k _: v
4 J) c, ~. T/ k% K' O public static void main(String arg[]){& c& R1 B2 g4 ]. _
System.out.println("------------------");" Z7 v) r) @7 w/ x% ]: a
System.out.println(" 當地時間 ");2 g U' L) _6 q: e/ H; t3 s$ v% X
System.out.println("------------------");
; E; R/ d1 p+ }! F" V Date d = Calendar.getInstance().getTime();
) k4 W9 ~2 _; \ SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/M/d a hh:mm");
& n" t+ i4 C1 a; R! H- E V( L SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/M/d a hh:mm:ss");8 C0 a/ B7 W0 l8 I5 _
SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy年M月d日 ahh時mm分ss秒");
: L1 G: y9 s$ n/ J: u, Y: Q: x SimpleDateFormat sdf4 = new SimpleDateFormat("yyyy年M月d日 E ahh時mm分ss秒 z");
( \' F. [$ r- J' \ d3 r System.out.println(sdf1.format(d));, B2 ]7 r( Q. n* ] O0 [
System.out.println(sdf2.format(d));7 n- k6 N" c5 d- P+ c
System.out.println(sdf3.format(d));3 c5 ?; l/ `( Y2 c/ i
System.out.println(sdf4.format(d));
: z) o- ~5 {. I5 Q0 i }, j, F* P) i# H, F
} |