Example usage for java.util Currency getDisplayName

List of usage examples for java.util Currency getDisplayName

Introduction

In this page you can find the example usage for java.util Currency getDisplayName.

Prototype

public String getDisplayName() 

Source Link

Document

Gets the name that is suitable for displaying this currency for the default Locale.Category#DISPLAY DISPLAY locale.

Usage

From source file:Main.java

public static void main(String args[]) {
    Locale locale = Locale.UK;
    Currency curr = Currency.getInstance(locale);

    System.out.println(curr.getDisplayName());
}

From source file:Test.java

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  .j ava  2  s .  c o  m

}