How to find all currency symbols?

I have an application that makes currency exchange. I need to set the text with a character something like 4.25 (there should be a character here)

How can i do this? and how to put this in a String?

+5
source share
1 answer

You can use java.util.Currency to get the currency symbol.

You can use this,

 Currency mDefaultCurrency = Currency.getInstance(currencyCode); // currecyCode - ISO 4217 code of the currency as per doc finalValue = String.format("%.2f %s", value, mDefaultCurrency.getSymbol()); 

or you can use Currency.getInstance(Locale locale)

If you want to check the entire supported list, you can use Currecny.getAvailableCurrencies() to specify a set of currencies

+6
source

Source: https://habr.com/ru/post/1270506/


All Articles