double数据保留指定位数,四舍五入 1 double d = 114.145; 2 d = (double) Math.round(d * 100) / 100; 3 System.out.println(d);