The isSupported() method is a built-in method of the Month ENUM which is used to check if the specified field is supported or not. This method accepts a fields as a parameter and returns true or false based on whether the field is supported or not.
public boolean isSupported(TemporalField field)
Parameters: This method accepts a single parameter field, which is to be checked if it is supported or not.
Return Value: This method returns a boolean value True if the field is supported otherwise it returns False.
Below programs illustrate the above method:
This field is supported!
This field is not supported!
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.