Java Calendar isSet() MethodThe isSet() method of java.util.Calendar class is a final method which returns the Boolean value. This method checks whether the passed parameter value is set or not. If it is not set, it returns false otherwise true SyntaxParameterfield - the calendar field. ReturnsReturns a Boolean value. ThrowsDoes not throw Exception. Example 1Output: Today Mon Aug 13 22:21:16 PDT 2018 Year is set: true Year is set: false Example 2Output: Today Mon Aug 13 22:29:19 PDT 2018 Year is set: true Month is set: true Day of week is set: true After clearing calendar Year is set: false Month is set: false Day of week is set: false Next TopicJava-calendar-isweekdatesupported-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