Date
public Date
(intyear,
intmonth,
intdate)
-
Deprecated.
As of JDK version 1.1,
replaced by
Calendar.set(year + 1900, month, date)orGregorianCalendar(year + 1900, month, date). - Allocates a
Dateobject and initializes it so that it represents midnight, local time, at the beginning of the day specified by theyear,month, anddatearguments.
Parameters:
-
year- the year minus 1900. -
month- the month between 0-11. -
date- the day of the month between 1-31.
本文介绍了Java中使用Deprecated的Date构造函数来初始化特定日期的方法,并解释了如何用Calendar或GregorianCalendar替代,以设置从1900年起始的年份、0-11之间的月份及1-31之间的具体日期。
583

被折叠的 条评论
为什么被折叠?



