java中小数金额的比较
BigDecimal data1 = new BigDecimal(“1”);BigDecimal data2 = new BigDecimal(“1.0”);if (data1.compareTo(data2) < 0) {System.out.println(“第二位数大!”);}if (data1.compareTo(data2) == 0) {System.out.println(“两位数一样大!”);}if (data1.compareTo(data2) >