As shown below:
1. Leave the decimals and round them: Math.floor(3.5)=3
2. Rounding: Math.rint(3.5)=4
3. Carry rounding: Math.ceil(3.1)=4
The above summary of the three rounding functions in Java is all the content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.