Exam 1z0-816 All QuestionsBrowse all questions from this exam
Question 31

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

    Correct Answer: A, B

    To set the default locale for formatting numbers, currency, and percentages, you need to use the Locale.setDefault method with the appropriate locale and category. Option A uses Locale.setDefault with Locale.Category.FORMAT and the locale 'zh-CN', which correctly specifies both the category and the locale for formatting purposes. Option B uses the same Locale.setDefault method with Locale.Category.FORMAT and the Locale.CANADA_FRENCH locale, which also correctly sets the locale for formatting. Options C, D, and E either lack the Locale.Category.FORMAT specification or use incorrect parameter formats, hence they are not suitable.

Discussion
Sa16253748596Options: BC

B,C is true