I have written the following code:
public class NewClass2 implements Comparator { public int compare(Point p1, Point p2) { retur
int compare(Double first, Double second) { if (Math.abs(first - second) < 1E-6) { return 0; } else { return Double.compare(first, second); } }