Using Currency on Java 1.7 : Currency « JDK 7 « Java






Using Currency on Java 1.7



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

public class Test {

  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());
    }

  }
}

 








Related examples in the same category

1.Format currency