Java Calendar getGreatestMinimum() MethodThe getGreatestMinimum() method of java.util.Calendar class is an abstract method. This method returns (maximum value out of all minimum values) highest minimum value of Calendar field passed as the parameter. SyntaxParameterfield - This method accepts Calendar field as parameter. ReturnsReturns an integer value which is the most significant value from all minimum values, i.e., the highest minimum value of passed Calendar field is returned. ThrowsDoes not throw Exception Example 1Test it NowOutput: Date :Sat Nov 23 00:00:00 PST 1996 The minimum (Year) is: 1 The minimum (Month) is: 0 The minimum (Day) is: 1 Example 2Test it NowOutput: Date :Sat Aug 04 14:36:36 PDT 2018 The minimum (Year) is: 1 The minimum (Month) is: 0 The minimum (Day) is: 1 Date :Fri May 27 14:36:36 PDT 4039 The minimum (Year) is: 1 The minimum (Month) is: 0 The minimum (Day) is: 1
Next TopicJava Calendar Class
|