Java Currency get available currencies

Description

Java Currency get available currencies

import java.util.Currency;
import java.util.Locale;
import java.util.Set;

public class Main {

   public static void main(String[] args) {
      Set<Currency> currencies = Currency.getAvailableCurrencies();
      for (Currency currency : currencies) {
         System.out.println("" + currency.getDisplayName() + " - " + currency.getDisplayName(Locale.GERMAN) + " - "
               + currency.getNumericCode());
      }/*from  w w w.ja  v  a  2 s .  c o  m*/

   }
}



PreviousNext

Related