Currency.getDisplayName() has the following syntax.
public String getDisplayName()
In the following code shows how to use Currency.getDisplayName() method.
/*from w w w. j a v a 2 s . c om*/ 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()); } }
The code above generates the following result.