OffsetDateTime isAfter(OffsetDateTime other) example
Description
OffsetDateTime isAfter(OffsetDateTime other)
checks if the instant of this date-time is after that of the specified date-time.
Syntax
isAfter
has the following syntax.
public boolean isAfter(OffsetDateTime other)
Example
The following example shows how to use isAfter
.
import java.time.OffsetDateTime;
//from ww w . java2s . c om
public class Main {
public static void main(String[] args) {
OffsetDateTime o = OffsetDateTime.MAX;
System.out.println(o.isAfter(OffsetDateTime.MIN));
}
}
The code above generates the following result.