![]() |
Re: Format decimals places
"JL Smith" <leesmith@myspeedworks.com> wrote in
news:_N0Ka.568$IP6.26208@eagle.america.net: > Hello, > > I have a double and I want it to always have two decimal places behind > it. How would I do this? Thanks for any help! > > > Hello, You can make use of the class NumberFormat or the class DecimalFormat in the java.text package. They provide many manipulation on the number representation. The method setMaximumFractionDigits() is the one you want I think. Hope this can help you. Benny Tang |
| All times are GMT. The time now is 12:55 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.