I know math.round(), will round a number to the nearest decimal. But if I want to round down a number is there a better way to do it?

Login

0 votes

You can use Math.floor() to do this. For further reference, check __here__.

Interested in Java? Check out this Java Certification by Intellipaat.