Rounding negative numbers in Java

后端 未结 6 944
予麋鹿
予麋鹿 2020-12-09 10:30

According to Wikipedia when rounding a negative number, you round the absolute number. So by that reasoning, -3.5 would be rounded to -4. But when I use java.lang.Math.round

6条回答
提交回复
热议问题