Mega Code Archive

 
Categories / Java / Development Class
 

Give a known Locale (with the right decimal separator) to bypass the current Locale

import java.util.Locale; public class Main {   public static void main(String[] argv) {     System.out.printf(Locale.UK, "%6.2f%n", 123456.7890);   } } //123456.79