This method checks if the provided TemporalField is supported by this instance.
If this method returns false, then calling the range, get and with methods will throw an exception.
public boolean isSupported(TemporalUnit unit)
This methods check if the provided TemporalUnit is supported by this instance.
If this method returns true for the specified unit, then corresponding value can be added to, or subtracted from, this date. If false, then calling the plus and minus methods will throw an exception.
public static void main (String... args) { LocalDateTime d = LocalDateTime.now(); boolean b = d.isSupported(ChronoField.DAY_OF_MONTH); System.out.println(b);