LocalTime isAfter(LocalTime other) example
Description
LocalTime isAfter(LocalTime other)
checks if this
LocalTime is after the specified time.
Syntax
isAfter
has the following syntax.
public boolean isAfter(LocalTime other)
Example
The following example shows how to use isAfter
.
import java.time.LocalTime;
/* www. j a va2 s . co m*/
public class Main {
public static void main(String[] args) {
LocalTime l = LocalTime.now();
System.out.println(l.isAfter(LocalTime.NOON));
}
}
The code above generates the following result.