I have float values like 8.0, 3.0, 5.5. I need them to become 8.00, 3.00, 5.50 etc. Nothing I try gives me two decimal places. This is necessary because I use this value in a fixed length string so 8.0 will become 0000800.
posted 9 years ago
There are classes to format numberic values to String with a lot of user choices. Look at the DecimalFormat class for example.