更新时间:2023-02-06 20:51:17
GregorianCalendar
standar类有一个 isLeapyear()
方法。如果你有一个年份(例如 2008
),那么使用此构造函数,然后检查 isLeapYear()
方法。
The GregorianCalendar
standar class has an isLeapyear()
method. If all you've got is a year number (say, 2008
), then construct a date using this constructor, and then check the isLeapYear()
method afterwards.