0

我有一个必须用来设置 Date 对象的方法,如下所示:

  • 方法名称(日期 d)

现在需要很长时间的构造函数处理起来似乎有点棘手,所以我想听听你是否有人知道如何使它起作用,这将指定年、月和日时间.????

4

1 回答 1

1

您可以改用日历。它有日期和时间。

Calendar field access

Field                    Explanation
Calendar.YEAR            Identifies the year
Calendar.MONTH           Identifies the month
Calendar.DAY_OF_MONTH    Identifies the day
Calendar.HOUR            Identifies the hour
Calendar.MINUTE          Identifies the minute
Calendar.SECOND          Identifies the second
于 2013-02-14T09:45:23.050 回答