Java Date Time Java Java API
java.time.MonthDay
public boolean isAfter(MonthDay other)
Checks if this month-day is after the specified month-day.
package com.logicbig.example.monthday;import java.time.MonthDay;public class IsAfterExample { public static void main(String... args) { MonthDay m1 = MonthDay.of(10, 21); System.out.println(m1); MonthDay m2 = MonthDay.of(5, 15); System.out.println(m2); boolean b = m2.isAfter(m1); System.out.println(b); boolean b2 = m1.isAfter(m2); System.out.println(b2); }}
--10-21--05-15falsetrue