I\'m having some problems formatting the decimals of a double. If I have a double value, e.g. 4.0, how do I format the decimals so that it\'s 4.00 instead?
Use String.format:
String.format("%.2f", 4.52135);
As per docs:
The locale always used is the one returned by Locale.getDefault().
Locale.getDefault()