摘要: DecimalFormat f = new DecimalFormat("#,##0.00"); f.setRoundingMode(RoundingMode.HALF_UP); double d = 1.125; System.out.println(f.format(d)); // 输出 1.1 阅读全文
posted @ 2016-04-25 21:18 沧海一滴 阅读(443) 评论(0) 推荐(0)