Javatpoint Logo
Javatpoint Logo

Java Calendar getLeastMaximum() Method

The getLeastMaximum() method of java.util.Calendar class is an abstract method. This method returns smallest value from all maximum value for field specified as parameter to the method. It takes field in integer form as parameter. And returns an integer.

Syntax

Parameter

field - the calendar field.

Returns

Returns lowest from all maximum value for specified Calendar field.

Throws

Do not throw any exception.

Example 1

Test it Now

Output:

Date :Sat Nov 23 00:00:00 PST 1996
The Least Maximum  (Year) is: 292269054
The Least Maximum  (Month)  is: 11
The Least Maximum  (Day) is: 7

Example 2

Test it Now

Output:

Date :Sun Aug 05 00:23:46 PDT 2018
The Least Maximum (Year) is: 292269054
The Least Maximum (Month)  is: 11
The Least Maximum (Day) is: 7
 Date :Sat May 28 00:23:46 PDT 4039
The Least Maximum (Year) is: 292269054
The Least Maximum (Month)  is: 11
The Least Maximum (Day) is: 7



Help Others, Please Share

facebook twitter pinterest