Java Calendar getActualMaximum() MethodThe getActualMaximum() method of java.util.Calendar class returns an integer value which is the Maximum possible value of the calendar field passed as parameter to getActualMaximum() method. For example Maximum value for DATE field is 31, and similarly Maximum value for MONTH field is 11 . SyntaxParameterfield - the field of calendar like MONTH, HOUR , DAY_OF_MONTH etc. ReturnsReturns an integer value which is maximum value of field passed as parameter. ThrowsDo not throw any exception. Example 1Test it NowOutput: Maximum year value of Calendar is:292278994 Maximum year value of Gregorian Calendar is :292278994 Example 2Test it NowOutput: Maximum Month:11 Maximum DAY:31 Example 3Test it NowOutput: Maximum HOUR value:11 Maximum MINUTE value:59 Maximum SECOND value:59
Next TopicJava Calendar Class
|