Year isAfter(Year other)
checks if this year is
after the specified year.
isAfter
has the following syntax.
public boolean isAfter(Year other)
The following example shows how to use isAfter
.
import java.time.Year; /*w ww . ja v a 2s. co m*/ public class Main { public static void main(String[] args) { Year y = Year.of(2014); System.out.println(y.isAfter(Year.of(2015))); } }
The code above generates the following result.