Look at the definition for the format strings in the API doc for the class and method you are using. There are several examples there on different ways to do it.
Type: Posts; User: Norm
Look at the definition for the format strings in the API doc for the class and method you are using. There are several examples there on different ways to do it.
Read the API doc for the DecimalFormat class to see what format characters will give you the minimum fractional digits.
Where is the DecimalFormat class used in the code that was just posted?
...
Please post an example of the current output and add some comments to it showing what you want the output to be.
For example:
current: 1.23445
desired: 1.2
Also post the code that creates the...
Please post the program's output that shows the problem. Add some comments saying what is wrong with the output and show what you want the output to be.