Code example for DecimalFormatSymbols

Methods: setDecimalSeparatorsetGroupingSeparator

0
 * @author Cristian 
 */ 
public class Utility { 
 
	public static String FORMATO_DECIMAL = "#,##0.00";
	private static DecimalFormatSymbols symbolFormataNumero = new DecimalFormatSymbols();
	private static DecimalFormat decimalFormat = new DecimalFormat(
			Utility.FORMATO_DECIMAL);
	private static SimpleDateFormat dateFormat = new SimpleDateFormat(
			"dd/MM/yyyy"); 
 
	static { 
		Utility.symbolFormataNumero.setDecimalSeparator('.');
		Utility.symbolFormataNumero.setGroupingSeparator(',');
		Utility.decimalFormat
				.setDecimalFormatSymbols(Utility.symbolFormataNumero);
	} 
 
	public static DecimalFormat getDecimalFormatDefault() {
		return Utility.decimalFormat;
Contextual code suggestions in your IDE  Get Codota for Java