Java Currency .getDisplayName ( Locale locale)

Syntax

Currency.getDisplayName(Locale locale) has the following syntax.

public String getDisplayName(Locale locale)

Example

In the following code shows how to use Currency.getDisplayName(Locale locale) method.


/*w ww  .ja va2 s.  c  o m*/
import java.util.Currency;
import java.util.Locale;

public class Main {

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

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

The code above generates the following result.