Here you can find the source of getCurrencyFormat()
public static NumberFormat getCurrencyFormat()
//package com.java2s; //License from project: Apache License import java.text.NumberFormat; import java.util.Locale; public class Main { public static NumberFormat getCurrencyFormat() { return getCurrencyFormat(2); }// w ww . jav a 2s. c o m public static NumberFormat getCurrencyFormat(int fractionDigits) { NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.US); if (fractionDigits != 2) { nf.setMinimumFractionDigits(fractionDigits); nf.setMaximumFractionDigits(fractionDigits); } return nf; } }