Java Calendar getLeastMaximum() MethodThe 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. SyntaxParameterfield - the calendar field. ReturnsReturns lowest from all maximum value for specified Calendar field. ThrowsDo not throw any exception. Example 1Output: 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 2Output: 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 Next TopicJava-calendar-getmaximum-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