public class Point { public long x; public long y; public long z; public Point(long a, long b, long c) { x = a; y = b; z = c; } public Point(Point P) { x = P.x; y = P.y; z = P.z; } public boolean equals(Point Q) { return this.x == Q.x && this.y == Q.y && this.z == Q.z; } public String toString() { return "(" + x + " : " + y + " : " + z + ")"; } public static void main(String[] args) { Point P = new Point(3, 1, 0); Point Q = new Point(2, 4, 0); System.out.println(P.equals(Q)); } }