YearMonth isAfter(YearMonth other)
check if this year-month is
after the specified year-month.
isAfter
has the following syntax.
public boolean isAfter(YearMonth other)
The following example shows how to use isAfter
.
import java.time.YearMonth; public class Main { public static void main(String[] args) { YearMonth y = YearMonth.now(); System.out.println(y.isAfter(YearMonth.now())); } }
The code above generates the following result.