OffsetTime isBefore(OffsetTime other)
checks if the instant of this OffsetTime is before that of the specified time applying both times to a common date.
isBefore
has the following syntax.
public boolean isBefore(OffsetTime other)
The following example shows how to use isBefore
.
import java.time.OffsetTime; /*from w ww .java 2s. c o m*/ public class Main { public static void main(String[] args) { OffsetTime m = OffsetTime.now(); System.out.println(m.isBefore(OffsetTime.now())); } }
The code above generates the following result.