年自然不是了, 日是从1开始的。 set public final void set(int year, int month, int date) Sets the values for the fields year, month, and date. Previous values of other fields are retained. If this is not desired, call clear first. Parameters: year - the value used to set the YEAR time field. month - the value used to set the MONTH time field. Month value is 0-based. e.g., 0 for January. date - the value used to set the DATE time field.
日是从1开始的。
set
public final void set(int year,
int month,
int date)
Sets the values for the fields year, month, and date. Previous values of other fields are retained. If this is not desired, call clear first.
Parameters:
year - the value used to set the YEAR time field.
month - the value used to set the MONTH time field. Month value is 0-based. e.g., 0 for January.
date - the value used to set the DATE time field.
楼上的都说了!
真不知道Java 的这个类的设计者是怎么想的!
难道和一个礼拜是从礼拜天开始的一样吗?
合乎人民的习惯吗?
讨论一下!