package com.logicbig.example.year;
import java.time.MonthDay;
import java.time.Year;
public class IsValidMonthDayExample {
public static void main(String... args) {
MonthDay m = MonthDay.of(2, 29);
System.out.println(m);
Year y = Year.now();
System.out.println(y);
boolean b = y.isValidMonthDay(m);
System.out.println(b);
Year y2 = Year.of(2020);
System.out.println(y2);
boolean b2 = y2.isValidMonthDay(m);
System.out.println(b2);
}
}