Tag Archives: currency

Given the code fragment: (Exhibit) You want to display the value of currency as $100.00. Which code inserted

Given the code fragment:You want to display the value of currency as $100.00.Which code inserted on line 1 will accomplish this? A. NumberFormat formatter = NumberFormat.getCurrencyInstance(locale); B. NumberFormat formatter = NumberFormat.getInstance(locale).getCurrency(); C. NumberFormat formatter = NumberFormat.getCurrency(locale); D. NumberFormat formatter = NumberFormat.getInstance(locale); Correct Answer: B

Which two statements set the default locale used for formatting numbers, currency, and percentages? (Choose

Which two statements set the default locale used for formatting numbers, currency, and percentages? (Choose two.) A. Locale.setDefault(“en_CA”); B. Locale.setDefault(Locale.Category.FORMAT, Locale.CANADA_FRENCH); C. Locale.setDefault(Locale.Category.FORMAT, “zh-CN”); D. Locale.setDefault(Locale.SIMPLIFIED_CHINESE); E. Locale.setDefault(“es”, Locale.US); Correct Answer: A,B