GregorianCalendar getMinimalDaysInFirstWeek() in Java

getMinimalDaysInFirstWeek(): This method is available in java.util.GregorianCalendar class of Java.

Syntax:

int java.util.Calendar.getMinimalDaysInFirstWeek()

This method gets the minimal days required in the first week of the year.

Parameters: NA

Returns: the minimal days required in the first week of the year.

Exceptions: NA

Approach

Java

import java.util.GregorianCalendar;

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

        GregorianCalendar cal = new GregorianCalendar();

        System.out.println(cal.getMinimalDaysInFirstWeek());
    }
}

Output:

1


No comments:

Post a Comment