Code example for DecimalFormatSymbols

Methods: setDecimalSeparator

0
public class EasyFormat 
{ 
  private static DecimalFormat stdFormat = null;
  public static DecimalFormat getStdFormat()
  { 
    if (stdFormat == null)
    { 
      DecimalFormatSymbols dsymb = new DecimalFormatSymbols();
      // on french locales, dots print like comma 
      dsymb.setDecimalSeparator('.');
      stdFormat = new DecimalFormat("0.0000");
      stdFormat.setDecimalFormatSymbols(dsymb);
    } 
    return stdFormat;
  } 
  public static String std(double number)
  { 
    return getStdFormat().format(number);
  } 
  public static String fmt(double number)
  {