Convert a number using the current Locale()
import java.text.NumberFormat; import java.util.Locale; public class Main { public static void main(String[] args) throws Exception { System.out.println(NumberFormat.getInstance(new Locale("us")).format(12345.12345)); } } //12,345.123