Java.util.GregorianCalendar.getMinimum() 方法 Java.util.EnumSet.of() Java.util.EnumSet.of() 方法 Java.util.GregorianCalendar.getMinimum() 方法 package com.codingdict; import java.util.*; public class GregorianCalendarDemo { public static void main(String[] args) { // create a new calendar GregorianCalendar cal = (GregorianCalendar) GregorianCalendar.getInstance(); // print the current date and time System.out.println("" + cal.getTime()); // get minimum for day_of_month int min = cal.getMinimum(GregorianCalendar.DAY_OF_MONTH); System.out.println("Minimum:" + min); // get minimum for YEAR min = cal.getMinimum(GregorianCalendar.YEAR); System.out.println("Minimum:" + min); } } Java.util.EnumSet.of() Java.util.EnumSet.of() 方法