Here you can find the source of currency(double amount, String language, String country)
public static String currency(double amount, String language, String country)
//package com.java2s; //License from project: Apache License import java.text.NumberFormat; import java.util.Locale; public class Main { /**/*from w ww . j a v a 2 s.co m*/ * Format a currency amount in a given locale. */ public static String currency(double amount, Locale locale) { NumberFormat nf = NumberFormat.getCurrencyInstance(locale); return nf.format(amount); } /** * Format a currency amount in a given locale. */ public static String currency(double amount, String language, String country) { Locale locale = null; if (language == null || country == null) { locale = Locale.getDefault(); } else { locale = new Locale(language, country); } return currency(amount, locale); } }