GregorianCalendar startDate = new GregorianCalendar(2009, Calendar.JANUARY, 1);
SimpleDateFormat sdf = new SimpleDateFormat("d/m/yyyy");
public void setStart()
{
startDate.setLenient(false);
System.out.println(sdf.format(startDate.getTime()));
}
当我运行此代码时,我得到 1/0/2009。当我改变月份时,我也会得到同样的结果。它有什么问题,我该如何解决?