GregorianCalendar getActualMinimum(int) in Java

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

Syntax:

int java.util.GregorianCalendar.getActualMinimum(int field)

This method takes one argument of type int as its parameter. This method returns the minimum value that this calendar field could have.

Parameters: One parameter is required for this method.

field: the calendar field.

Returns: the minimum of the given field for the time value of this GregorianCalendar.

Exceptions: NA

Approach

Java

import java.util.GregorianCalendar;

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

        GregorianCalendar cal = new GregorianCalendar();

        int field = 0;

        System.out.println(cal.getActualMinimum(field));
    }
}

Output:

0


No comments:

Post a Comment