Java: How do I set the decimal place of a double to 2 places.
Hey guys. need help
this.price = (Math.random()*100);
this comes out 8.1234567890123456
I want 8.12
I am stumped must be pretty simple but none of the books I have seem to cover it. odd.
Cheers
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement