February 2014
Beginner
1248 pages
62h 25m
English
During each iteration of the loop, line 26
NumberFormat.getCurrencyInstance().format(amount)
evaluates as follows:
1. First, the expression uses NumberFormat’s static method getCurrencyInstance to get a NumberFormat that’s pre-configured to format numeric values as locale specific currency Strings—for example, in the U.S. locale, the numeric value 1628.89 is formatted as $1,628.89. Locale-specific formatting is an important part of internationalization—the process of customizing your applications for users’ various locales and spoken languages.
2. Next, the expression invokes method NumberFormat method format (on the object returned by getCurrencyInstance) to perform ...
Read now
Unlock full access