参考答案:
在 Java 中,Math.round() 方法用于将浮点数四舍五入为最接近的整数(返回值为 long 类型)。
Math.round()
long
Math.round(11.5):
Math.round(11.5)
12
Math.round(-11.5):
Math.round(-11.5)
-11
最近更新时间:2024-12-09