package rextester; public class Dist2D { public static void main(String[] args) { Point2D p1 = new Point2D(); Point2D p2 = new Point2D(1,1); System.out.println("Відстань між точками "+p1+" и "+p2+" дорівнює "+p1.length(p2)); } }