白 float f = 0.123456f; float f2 = (float)(Math.round(f*100))/100; System.out.println(f2); //结果:0.12 相关文章: 2021-08-14 2022-02-24 2022-12-23 2022-12-23 2022-12-23 2021-08-11 2022-12-23