ZoneOffset equals(Object obj)
checks if this offset is equal to another offset.
equals
has the following syntax.
public boolean equals(Object obj)
The following example shows how to use equals
.
import java.time.ZoneOffset; public class Main { public static void main(String[] args) { ZoneOffset z = ZoneOffset.UTC; System.out.println(z.equals(ZoneOffset.UTC)); } }
The code above generates the following result.