Up until recently my code was working fine on my development machine as well as on the deployment server.
Now out of the blue, the DecimalFormat does not work as expected and I am pretty sure that is after the windows 10 Creators Update.
My code is:
double x = 22.44;
DecimalFormat df = new DecimalFormat("0.00");
System.out.println(df.format(x));
Output: 22,44 Instead of 22.44
If i change it to :
double x = 22.44;
DecimalFormat df = new DecimalFormat("0,00");
System.out.println(df.format(x));
Output is: 0.22
I am using netbeans 7.4 with jdk 1.7.0_79u (64 bit) Tried changing my jdk to 1.7.0_80u (32 bit) but made no difference. Also changed the locale setting for Decimal Symbol and Digit Grouping Symbol but still the same problem.
Anyone with ideas on how to solve this issue?