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