Here you can find the source of getDecimalFormat(String pattern)
public static DecimalFormat getDecimalFormat(String pattern)
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; public class Main { public static DecimalFormat getDecimalFormat(String pattern) { DecimalFormatSymbols symbols = new DecimalFormatSymbols(); symbols.setDecimalSeparator('.'); DecimalFormat format = new DecimalFormat(pattern); format.setDecimalFormatSymbols(symbols); return format; }/*w w w.j a v a2 s .c o m*/ }