double数据类型0.0和-0.0的比较问题。
System.out.println(0.0 == -0.0); System.out.println(Double.compare(0.0, -0.0)); System.out.println(new Double(0.0).equals(new Double(-0.0))); Map<Double, Integer> map = new HashMap<>(); map.put(0.0, 1); map.put(-0.0, 2); System.out.println(map.size()); System.out.println((double)(2-2)/(1-2)); System.out.println((double)(3-3)/(2-1)); System.out.println(0.0 ==