java.time.Year.isSupported(TemporalUnit unit)


java.time.Year.isSupported(TemporalUnit unit)

package com.codingdict;

import java.time.Year;
import java.time.temporal.ChronoUnit;

public class YearDemo {
   public static void main(String[] args) {

      Year date = Year.of(2020);
      System.out.println(date.isSupported(ChronoUnit.ERAS));  
   }
}