Skip to content

Yet another programming solutions log

Sample bits from programming for the future generations.

Technologies Technologies
  • Algorithms and Data Structures
  • Java Tutorials
  • JUnit Tutorial
  • MongoDB Tutorial
  • Quartz Scheduler Tutorial
  • Spock Framework Tutorial
  • Spring Framework
  • Bash Tutorial
  • Clojure Tutorial
  • Design Patterns
  • Developer’s Tools
  • Productivity
  • About
Expand Search Form

Java Util Currency Tutorial

farenda 2016-05-16 0

The java.util.Currency class represents a currency. These are the main properties of the class:

  • Currencies are identified by their ISO 4217 currency codes
  • There is never more than one Currency instance for any given currency
  • Get instance of the class using getInstance() methods
  • the class is final and cannot be inherited.

The class declaration is:

public final class Currency
       extends Object
       implements Serializable

Methods inheritance

Objects of this class inherit methods from the following classes:

  • java.lang.Object

Methods of java.util.Currency:

  • static Set<Currency> getAvailableCurrencies()
    This method gets the set of available currencies.
  • String getCurrencyCode()
    This method gets the ISO 4217 currency code of this currency.
  • int getDefaultFractionDigits()
    This method gets the default number of fraction digits used with this currency.
  • String getDisplayName()
    This method gets the name that is suitable for displaying this currency for the default DISPLAY locale.
  • String getDisplayName(Locale locale)
    This method gets the name that is suitable for displaying this currency for the specified locale.
  • static Currency getInstance(Locale locale)
    This method returns the Currency instance for the country of the given locale.
  • static Currency getInstance(String currencyCode)
    This method returns the Currency instance for the given currency code.
  • int getNumericCode()
    This method returns the ISO 4217 numeric code of this currency.
  • String getSymbol()
    This method gets the symbol of this currency for the default DISPLAY locale.
  • String getSymbol(Locale locale)
    This method gets the symbol of this currency for the specified locale.
  • String toString()
    This method returns the ISO 4217 currency code of this currency.
Share with the World!
Categories Java Tags i18n, java, java-util
Previous: Java Util Currency toString
Next: Quartz Scheduler start and shutdown

Recent Posts

  • Java 8 Date Time concepts
  • Maven dependency to local JAR
  • Caesar cipher in Java
  • Java casting trick
  • Java 8 flatMap practical example
  • Linked List – remove element
  • Linked List – insert element at position
  • Linked List add element at the end
  • Create Java Streams
  • Floyd Cycle detection in Java

Pages

  • About Farenda
  • Algorithms and Data Structures
  • Bash Tutorial
  • Bean Validation Tutorial
  • Clojure Tutorial
  • Design Patterns
  • Java 8 Streams and Lambda Expressions Tutorial
  • Java Basics Tutorial
  • Java Collections Tutorial
  • Java Concurrency Tutorial
  • Java IO Tutorial
  • Java Tutorials
  • Java Util Tutorial
  • Java XML Tutorial
  • JUnit Tutorial
  • MongoDB Tutorial
  • Quartz Scheduler Tutorial
  • Software Developer’s Tools
  • Spock Framework Tutorial
  • Spring Framework

Tags

algorithms bash bean-validation books clojure design-patterns embedmongo exercises git gof gradle groovy hateoas hsqldb i18n java java-basics java-collections java-concurrency java-io java-lang java-time java-util java-xml java8 java8-files junit linux lists log4j logging maven mongodb performance quartz refactoring regex rest slf4j solid spring spring-boot spring-core sql unit-tests

Yet another programming solutions log © 2022

sponsored