MonthDay isAfter(MonthDay other) example
Description
MonthDay isAfter(MonthDay other)
checks if this month-day
is after the specified month-day.
Syntax
isAfter
has the following syntax.
public boolean isAfter(MonthDay other)
Example
The following example shows how to use isAfter
.
import java.time.Month;
import java.time.MonthDay;
//from w w w.j a va2s. c o m
public class Main {
public static void main(String[] args) {
MonthDay m = MonthDay.now();
System.out.println(m.isAfter(MonthDay.of(Month.APRIL, 1)));
}
}
The code above generates the following result.