import java.util.Calendar;
public class DateDemo2 {
public static void main(String[] args) {
Calendar c = Calendar.getInstance();
System.out.println(c.get(Calendar.YEAR) + "年"
+ (c.get(Calendar.MONTH) + 1) + "月" + c.get(Calendar.DATE)
+ "日" + "星期" + c.get(Calendar.WEEK_OF_MONTH) + ","
+ c.get(Calendar.HOUR_OF_DAY) + ":" + c.get(Calendar.MINUTE)
+ ":" + c.get(Calendar.SECOND) + ":"
+ c.get(Calendar.MILLISECOND));
}
}这种格式的是不是无法显示出00~09啊,求告知
|
|