可用来学习或复习java基础知识 4.日期和时间 如何取得年月日,小时分秒? Calendar c = Calendar.getInstance(); //取得年月日,小时分秒 int year = c.get(Calendar.YEAR); int month = c.get(Calendar.MONTH)+1; int day = c.get(Calendar.DATE); int hour = c.get(Calendar.HOUR); int minute = c.get(Calend
%@page contentType="text/html; charset=GBK"%> time GetDate.java中的代码 import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Da te; public class GetDate { public String getDate() { SimpleDateFormat lFormat; Date date