BigDecimal bd = new BigDecimal(5.2500); BigDecimal a = bd.setScale(1, BigDecimal.ROUND_HALF_UP); double b = a.doubleValue(); System.out.println(b);
时间: 2024-12-23 02:08:43
BigDecimal bd = new BigDecimal(5.2500); BigDecimal a = bd.setScale(1, BigDecimal.ROUND_HALF_UP); double b = a.doubleValue(); System.out.println(b);