Here you can find the source of formatMoney(BigDecimal money, Locale locale)
public static String formatMoney(BigDecimal money, Locale locale)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.*; public class Main { public static String formatMoney(BigDecimal money, Locale locale) { if (money == null) return null; if (locale != null) { ResourceBundle bundle = ResourceBundle.getBundle( "entityNotifications", locale); NumberFormat format = NumberFormat.getNumberInstance(locale); ((DecimalFormat) format).applyPattern(bundle .getString("format.float.invoice")); return format.format(money.doubleValue()); }/* w w w. ja v a2s . co m*/ return new DecimalFormat("#0.00").format(money); } }