Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone there is a problem with my printf function in java (intellij ide).
It prints numbers in persian mode (its ok in another methods like println) .i would be thankful if you help me fix this to print in english.

What I have tried:

System.out.printf ("%.3f",2.34) ;
Posted
Updated 11-Mar-20 13:36pm

1 solution

Java
System.out.printf(Locale.ENGLISH, "%.3f", 2.34);

That should work.

Reference: PrintStream (Java Platform SE 8 )[^]
 
Share this answer
 
Comments
Maciej Los 12-Mar-20 2:52am    
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900