| Author |
Dealing with decimal places
|
Azam Bukhari
Ranch Hand
Joined: Oct 03, 2000
Posts: 58
|
|
Dear Community, if i want a decimal number i.e float or double display numbers only upto two three or whatever i choose the limit after decimal places.. Azam sazam@email.com ===================== Also how does one become a Ranchhand, bartender, sherrif??
|
Don't wanna invent the wheel again!!
|
 |
Paul Stevens
Ranch Hand
Joined: May 17, 2001
Posts: 2823
|
|
Take a look at the DecimalFormat class. The methods that you need to look at are: applyPattern() - It will set the pattern of how you want the data to appear ie #,##0.00 format() - Which actually applies the pattern. As far as your other question do a search in the Java Ranch forum. There are explanations on each of those. If you can't find them, just ask.
|
 |
 |
|
|
subject: Dealing with decimal places
|
|
|