java 保留两位小数 · 保留两位 · 问题: 方式一: 四舍五入 double f = 111231.5585; BigDecimal b = new BigDecimal(f); double f1 = b.setScale(2, BigDecimal.
確定! 回上一頁