I live in Belgium. And generally, in mathematics, we write our decimals with a comma like this: 3,141592
And that is also the result when I format the float.
System.out.println(String.format("%f", 3.141592));
So, the .
is replaced by a ,
like so: 3,141592
. So always when I need a point instead I have to add something like this: String.format("%f", 3.14).replace(',','.');
So, the question is: is there a way to change the Locale which makes every formatter in Java use a point, instead of comma?
Thanks
System.out.println(Locale.getDefault());
prints
nl_BE