A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Programmer Certification (SCJP/OCPJP)
Joined: Jan 14, 2009
Apr 21, 2009 08:23:12
Hi Khalid and Rolf:
I need to know a way to round a double to a percentage. I want anything that is greater than 5 rounded up and anything less rounded down.
Example: 92.5 should be 93% and
91.2 should be 91%.
Joined: Oct 29, 2008
Apr 21, 2009 08:35:57
check BigDecimal class .... clue: ROUND_HALF_UP
Open Source leads to Open Mind
I agree. Here's the link:
BigDecimal: divide round help
how to display rounded box using custom taglib?
how to find out the multiples of 12?
floating point round to 2.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014