Calendar getActualMaximum() Method in Java with Examples
The getActualMaximum(int field_value) method of Calendar class is used to return the maximum value that the specified calendar field could have, based on the time value of this Calendar.
public int getActualMaximum(int field_value)
Parameters: The method takes one parameter field_value of integer type and refers to the calendar whose maximum value is needed to be returned.
Return Value: The method returns the maximum value of the passed field.
Below programs illustrate the working of getActualMaximum() Method of Calendar class:
The Maximum year: 292278994 The Maximum Month is: 11
The Maximum year: 292278993 The Maximum Month is: 11
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.