OffsetTime isEqual(OffsetTime other) example
Description
OffsetTime isEqual(OffsetTime other)
checks
if the instant of this OffsetTime is equal to that of the specified time applying both times to a common date.
Syntax
isEqual
has the following syntax.
public boolean isEqual(OffsetTime other)
Example
The following example shows how to use isEqual
.
import java.time.OffsetTime;
/*www . jav a2 s. co m*/
public class Main {
public static void main(String[] args) {
OffsetTime m = OffsetTime.now();
System.out.println(m.isEqual(OffsetTime.now()));
}
}
The code above generates the following result.