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 1Test it NowOutput: 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 2Test it NowOutput: 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 Class
|