It’s very common task in Java to format double to 2 decimal places – usually to format currency. It’s not easy to do correctly, but in this post we’ll show how.
Continue reading Java format double 2 decimal places – currency formattingi18n
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: …
Continue reading Java Util Currency Tutorialjava.util.Currency.toString() The method java.util.Currency.toString() overrides Object.toString() and returns the ISO 4217 currency code of this currency.
Continue reading Java Util Currency toStringjava.util.Currency.getSymbol() The method java.util.Currency.getSymbol() gets the symbol of this currency for the default DISPLAY locale or ISO 4217 currency code.
Continue reading Java Util Currency getSymboljava.util.Currency.getSymbol(Locale) The method java.util.Currency.getSymbol(Locale) gets the symbol of this currency for the specified locale or ISO 4217 currency code.
Continue reading Java Util Currency getSymbol(Locale)java.util.Currency.getNumericCode() Currencies are identified by their ISO 4217 currency codes. The method java.util.Currency.getNumericCode() returns the ISO 4217 numeric code of this currency.
Continue reading Java Util Currency getNumericCodeJava Locale information In this tutorial we’re going to show how to get information from Locale, display it nicely to users and get installed locales in the system.
Continue reading Java Locale informationJava Locale create in different ways In this tutorial we’re going to show how to create Locale using builder, constructors, and factory method for different languages and variants to get localized dates.
Continue reading Java Locale create in different ways