Hi,
I'm trying to use DecimalFormat to format numbers according to the current locale. I don't understand why I don't have the output that I expect.
The code I'm using looks like this :
DecimalFormat df = new DecimalFormat("#.##0"
String output = df.format(5.0);
System.out.println(value + " " + pattern + " " + output);
I was expecting to have the number formatted like that : 5,000
What I get is : 5,0
Is it a bug or am I missing something ?
Thanks in advance.
I'm trying to use DecimalFormat to format numbers according to the current locale. I don't understand why I don't have the output that I expect.
The code I'm using looks like this :
DecimalFormat df = new DecimalFormat("#.##0"
String output = df.format(5.0);
System.out.println(value + " " + pattern + " " + output);
I was expecting to have the number formatted like that : 5,000
What I get is : 5,0
Is it a bug or am I missing something ?
Thanks in advance.