String.format("%.2f",0.333333);
gives 0,33
but I’d like to have 0.33
.
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
String.format("%.2f",0.333333);
gives 0,33
but I’d like to have 0.33
.
2
Answers
Put Locale.ROOT inside, like this:
String.format()
picks the locale you are in. You have to specify the locale explicitly if you want. instead of,You can use it like this: