Java Calendar getMaximum() MethodThe getMaximum() method of java.util.Calendar class is an abstract method. This method is used with calendar object to get the maximum value of specified calendar field as parameter. SyntaxParameterfield - the calendar field. ReturnsThe maximum value for the given calendar field. ThrowsDo not throw any Exception Example 1Output: Date :Sun Aug 05 00:36:49 PDT 2018 The Maximum (Year) is: 292278994 The Maximum (Month) is: 11 The Maximum (Day) is: 7 Date :Sat May 28 00:36:49 PDT 4039 The Maximum (Year) is: 292278994 The Maximum (Month) is: 11 The Maximum (Day) is: 7 Example 2Output: Date :Sat Nov 23 00:00:00 PST 1996 The Maximum (Year) is: 292278994 The Maximum (Month) is: 11 The Maximum (Day) is: 7 Next TopicJava-calendar-get-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India