double 保留两位小数 用 Math.round。测试代码如下: class round{ public static void main(String args){ double a = 123.13698; double roundOff = Math.round(a*100)/100.0; System.out.println(roundOff); // 123.14 } } 参考:https://stacko Java 桩白墨 2018-01-31 5 热度 0评论