Gets the set of available currencies. The returned set of currencies contains all of the available currencies, which may include currencies that represent obsolete ISO 4217 codes
Gets the set of available currencies. The returned set of currencies contains all of the available currencies, which may include currencies that represent obsolete ISO 4217 codes
e.g.
import java.util.Currency;
*******************************
Set<Currency> availableCurrenciesSet;
List<Currency> currencyList;
availableCurrenciesSet = Currency.getAvailableCurrencies();
currencyList = new ArrayList<>(availableCurrenciesSet);
for (int i = 0; i < currencyList.size(); i++) {
if (currencyList.get(i).getCurrencyCode().equalsIgnoreCase(currencyCode)) {
tv_currencySymbol.setText(currencyList.get(i).getSymbol());
tv_currencyDisplayName.setText("Display Name: ".concat(currencyList.get(i).getDisplayName()));
tv_currencyCode.setText("Currency Code: ".concat(currencyList.get(i).getCurrencyCode()));
tv_fractionDigits.setText("FractionDigits:".concat(String.valueOf(currencyList.get(i).getDefaultFractionDigits())));
tv_numericCode.setText("Numeric Code: ".concat(String.valueOf(currencyList.get(i).getNumericCode())));
}
}
************************