public class Point { private final int x; private final int y; public Point(int x, int y) { this.x = x; this.y = y; } public Point() { this(0,0); //calls sibling constructor } public Point reflectionAcrossX() { return new Point(x, -y); } @Override public String toString() { return String.format("(%s, %s)", x, y); } public double distanceTo(Point that) { return Math.hypot(x - that.x, y - that.y); } }