Here you can find the source of getFormatter()
private static DecimalFormat getFormatter()
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; public class Main { private static DecimalFormat formatter = null; private static DecimalFormat getFormatter() { if (formatter == null) { DecimalFormat lFormatter = new DecimalFormat("#,###.###"); DecimalFormatSymbols smb = new DecimalFormatSymbols(); smb.setGroupingSeparator(' '); lFormatter.setDecimalFormatSymbols(smb); formatter = lFormatter;//from w ww . j a v a 2 s . c o m } return formatter; } }