
- Java.util Package Classes
- Java.util - Home
- Java.util - ArrayDeque
- Java.util - ArrayList
- Java.util - Arrays
- Java.util - BitSet
- Java.util - Calendar
- Java.util - Collections
- Java.util - Currency
- Java.util - Date
- Java.util - Dictionary
- Java.util - EnumMap
- Java.util - EnumSet
- Java.util - Formatter
- Java.util - GregorianCalendar
- Java.util - HashMap
- Java.util - HashSet
- Java.util - Hashtable
- Java.util - IdentityHashMap
- Java.util - LinkedHashMap
- Java.util - LinkedHashSet
- Java.util - LinkedList
- Java.util - ListResourceBundle
- Java.util - Locale
- Java.util - Observable
- Java.util - PriorityQueue
- Java.util - Properties
- Java.util - PropertyPermission
- Java.util - PropertyResourceBundle
- Java.util - Random
- Java.util - ResourceBundle
- Java.util - ResourceBundle.Control
- Java.util - Scanner
- Java.util - ServiceLoader
- Java.util - SimpleTimeZone
- Java.util - Stack
- Java.util - StringTokenizer
- Java.util - Timer
- Java.util - TimerTask
- Java.util - TimeZone
- Java.util - TreeMap
- Java.util - TreeSet
- Java.util - UUID
- Java.util - Vector
- Java.util - WeakHashMap
- Java.util Package Extras
- Java.util - Interfaces
- Java.util - Exceptions
- Java.util - Enumerations
- Java.util Useful Resources
- Java.util - Useful Resources
- Java.util - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java.util.Currency Class
Introduction
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.
Class declaration
Following is the declaration for java.util.Currency class −
public final class Currency extends Object implements Serializable
Class methods
Sr.No. | Method & Description |
---|---|
1 | String getCurrencyCode()
This method gets the ISO 4217 currency code of this currency. |
2 | int getDefaultFractionDigits()
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. |
5 | String getSymbol()
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. |
7 | String toString()
This method returns the ISO 4217 currency code of this currency. |
Methods inherited
This class inherits methods from the following classes −
- java.util.Object