Java Calendar getMinimalDaysInFirstWeek方法


Java Calendar getMinimalDaysInFirstWeek方法

package com.codingdict;

import java.util.*;

public class CalendarDemo {
   public static void main(String[] args) {

      // create a calendar
      Calendar cal = Calendar.getInstance();

      // get what the minimal days required in the first week of the year
      int i = cal.getMinimalDaysInFirstWeek();

      // print the result
      System.out.println("Minimal days required :" + i);
   }
}