Java Calendar getMinimum方法


Java Calendar getMinimum方法

package com.codingdict;



import java.util.*;



public class CalendarDemo {

   public static void main(String[] args) {



      // create a calendar

      Calendar cal = Calendar.getInstance();



      // print the minimum value for years

      int min=cal.getMinimum(Calendar.YEAR);

      System.out.println("Minimum Years: "+ min);

   }

}