package class2_3_NestedLoops_start; public class Point { public int x; public int y; public Point(int x, int y) { this.x = x; this.y = y; } public double distance(Point other) { return Math.hypot(this.x-other.x,this.y-other.y); } @Override public String toString() { return "("+x+", "+y+")"; } }