List of usage examples for java.text DecimalFormat getGroupingSize
public int getGroupingSize()
From source file:Main.java
public static void main(String[] argv) throws Exception { DecimalFormat format = new DecimalFormat(); System.out.println(format.getGroupingSize()); }
From source file:org.mozilla.gecko.GeckoAppShell.java
private static void putLocaleEnv() { GeckoAppShell.putenv("LANG=" + Locale.getDefault().toString()); NumberFormat nf = NumberFormat.getInstance(); if (nf instanceof DecimalFormat) { DecimalFormat df = (DecimalFormat) nf; DecimalFormatSymbols dfs = df.getDecimalFormatSymbols(); GeckoAppShell.putenv("LOCALE_DECIMAL_POINT=" + dfs.getDecimalSeparator()); GeckoAppShell.putenv("LOCALE_THOUSANDS_SEP=" + dfs.getGroupingSeparator()); GeckoAppShell.putenv("LOCALE_GROUPING=" + (char) df.getGroupingSize()); }// w w w . j ava 2 s .c o m }