LocalTime isBefore(LocalTime other)
checks if this LocalTime is before the specified time.
isBefore
has the following syntax.
public boolean isBefore(LocalTime other)
The following example shows how to use isBefore
.
import java.time.LocalTime; public class Main { public static void main(String[] args) { LocalTime l = LocalTime.now(); System.out.println(l.isBefore(LocalTime.NOON)); } }
The code above generates the following result.