package com.logicbig.example.monthday;
import java.time.MonthDay;
public class IsValidYearExample {
public static void main(String... args) {
MonthDay m = MonthDay.of(5, 21);
System.out.println(m);
boolean b = m.isValidYear(2017);
System.out.println(b);
MonthDay m2 = MonthDay.of(2, 29);
System.out.println(m2);
//2017 is not a leap year
boolean b2 = m2.isValidYear(2017);
System.out.println(b2);
}
}