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 email@example.com ===================== Also how does one become a Ranchhand, bartender, sherrif??
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.