Here you can find the source of formatAsCurrency(Number value)
public static String formatAsCurrency(Number value)
//package com.java2s; //License from project: Apache License import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; public class Main { private static final DecimalFormat currencyFormat = new DecimalFormat("###,###,##0.00", DecimalFormatSymbols.getInstance(Locale.GERMANY)); public static String formatAsCurrency(Number value) { if (value == null) { return ""; }//from w w w . j a va 2 s .c om return currencyFormat.format(value); } }