java Math.round使用实例



java Math.round函数使用实例,以及相关的题目练习介绍。

Math.round(11.5)等於多少? Math.round(-11.5)等於多少?
Math.round(11.5)==12
Math.round(-11.5)==-11
round方法返回与参数最接近的长整数,参数加1/2后求其floor.