import java.util.*; //Date* @6 e; c b }! l) ?
import java.text.*; //SimpleDateFormat6 R1 f* q" k' c/ }" z, P1 g
4 t( _7 I+ W4 ~ v4 D4 N
public class j102{# o& {( P7 F9 W/ `
, G; E" g. j7 K3 D( s7 D1 ^: \* Y K
public static void main(String arg[]){
, j" [7 w$ G/ V System.out.println("------------------");3 b: r3 w. D( I+ c8 M' y
System.out.println(" 當地時間 ");
1 V$ H: e5 N' f- S! q- S System.out.println("------------------");0 m# U$ B2 j1 R1 v2 _) k
Date d = Calendar.getInstance().getTime();4 v% j* |0 l/ a7 E" C, R3 y- Y
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/M/d a hh:mm");
' V7 n% T3 |( K% e, V6 M' U) Y0 ]0 A SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/M/d a hh:mm:ss");
, S9 l& {% ?8 ]+ F; [ SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy年M月d日 ahh時mm分ss秒");: O$ d- M0 x+ I
SimpleDateFormat sdf4 = new SimpleDateFormat("yyyy年M月d日 E ahh時mm分ss秒 z");/ t3 a0 x; g3 w6 C/ l
System.out.println(sdf1.format(d));
4 n8 f' |4 s- B6 O& o3 U" s System.out.println(sdf2.format(d));
, X# Q" d. A+ i System.out.println(sdf3.format(d));
$ S- R9 A+ `0 G* A+ F System.out.println(sdf4.format(d));0 ^8 ?7 a7 k, b1 D
}
+ v/ n* f; o, w! s( Y} |