User Tools

Site Tools


Formatting Number in Specific Locale

If you want to format a number in a specific locale then you can use the NumberFormat class and specify your locale.

NumberFormat nf = NumberFormat.getNumberInstance(Locale.GERMAN);

This gives you the comma as a decimal separator.

formatting_numbers_in_specific_locale.txt · Last modified: 2014/01/10 15:03 by mihael