The java.util.Currency class represents a currency.Following are the important points about Currency −
Currencies are identified by their ISO 4217 currency codes.
The class is designed so that there's never more than one Currency instance for any given currency, this is the reason behind no public constructor.
Following is the declaration for java.util.Currency class −
public final class Currency extends Object implements Serializable
|Sr.No.||Method & Description|
This method gets the ISO 4217 currency code of this currency.
This method gets the default number of fraction digits used with this currency.
|3||static Currency getInstance(Locale locale)
This method returns the Currency instance for the country of the given locale.
|4||static Currency getInstance(String currencyCode)
This method returns the Currency instance for the given currency code.
This method gets the symbol of this currency for the default locale.
|6||String getSymbol(Locale locale)
This method gets the symbol of this currency for the specified locale.
This method returns the ISO 4217 currency code of this currency.
This class inherits methods from the following classes −