有两种中方法可以得到年月日的值,一种是用java.util.Date,但要以getYear()+1900,在getMonth()+1.第二种方法是用java.util.Calendar的成员域。最好用第二种,至JDK1.3以后推荐用第二种