NumberFormat Flashcards
Gets an instance of the NumberFormat class that will format numbers according to the given locale.
NumberFormat.getInstance(Locale locale)
Formats the number according to the NumberFormat’s locale.
String format(double, float, int, or long number)
Parses the number from the given String. It returns a Long or Double instance depending on the value of the number given. Throws a ParseException if the parse fails.
Number parse(String source)
Returns the list of the locales supported by the Java runtime for number formatting.
static Locale[] getAvaliableLocales()
Returns the currency instance used by this NumberFormat object.
Currency getCurrency()
Returns the instance of NumberFormat suitable for currency formatting purposes; an overloaded version of this method takes a Locale as an argument.
NumberFormat.getCurrencyInstance()
Returns the instance of NumberFormat suitable for use for formatting integer numbers; an overloaded version of this method takes a Locale as an argument.
NumberFormat.getIntegerInstance()
Returns the instance of NumberFormat suitable for use for formatting percentages; an overloaded version of this method takes a Locale as an argument.
NumberFormat.getPercentInstance()