GregorianCalendar
public GregorianCalendar(int year,
int month,
int date,
int hour,
int minute,
int second)Constructs a GregorianCalendar with the given date and time set for the default time zone with the default locale. Parameters:
year - the value used to set the YEAR time field in the calendar.
month - the value used to set the MONTH time field in the calendar. Month value is 0-based. e.g., 0 for January.//我靠,sun就这样做
date - the value used to set the DATE time field in the calendar.
hour - the value used to set the HOUR_OF_DAY time field in the calendar.
minute - the value used to set the MINUTE time field in the calendar.
second - the value used to set the SECOND time field in the calendar.不好意思出丑了
public GregorianCalendar(int year,
int month,
int date,
int hour,
int minute,
int second)Constructs a GregorianCalendar with the given date and time set for the default time zone with the default locale. Parameters:
year - the value used to set the YEAR time field in the calendar.
month - the value used to set the MONTH time field in the calendar. Month value is 0-based. e.g., 0 for January.//我靠,sun就这样做
date - the value used to set the DATE time field in the calendar.
hour - the value used to set the HOUR_OF_DAY time field in the calendar.
minute - the value used to set the MINUTE time field in the calendar.
second - the value used to set the SECOND time field in the calendar.不好意思出丑了
要往里面传递月份参数为 2
你还可以试试往里面传递月份的参数 0 看看得到的是否 1 月