Java maintenance and ecosystem

Format for explicit locales

Same numeric value, different presentation. Locale data can change across JDK releases.

Formal Syntax & Structure

java syntaxjava
NumberFormat.getIntegerInstance(locale)

Working Example

Example Snippetjava
public class Main {    public static void main(String[] args) throws Exception {        System.out.println(java.text.NumberFormat.getIntegerInstance(java.util.Locale.US).format(12345));        System.out.println(java.text.NumberFormat.getIntegerInstance(java.util.Locale.GERMANY).format(12345));    }}
Java Reference