Here you can find the source of toCurrencyFormat(String input)
public static String toCurrencyFormat(String input)
//package com.java2s; import java.text.*; public class Main { public static String toCurrencyFormat(String input) { if (input.indexOf(".") != -1) return NumberFormat.getCurrencyInstance().format((new java.lang.Double(input)).doubleValue()); else {/*from ww w . ja va 2s . com*/ return NumberFormat.getCurrencyInstance().format((new java.lang.Long(input)).longValue()); } } }