Oracle
1Z0-829 · Question #41
1Z0-829 Question #41: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-829 to reveal the answer and full explanation for question #41. The question stem and answer options stay visible for context.
Implementing Localization
Question
Given:
Captions.properties file:
user = UserName
Captions_en.properties file:
user = User name (EN)
Captions_US.properties file:
message = User name (US)
Captions_en_US.properties file:
message = User name (EN - US)
and the code fragment:
Locale.setDefault(Locale.US);
Locale currentLocale = new Locale.Builder().setLanguage("en").build();
ResourceBundle captions = ResourceBundle.getBundle("Captions.properties", currentLocale);
System.out.println(captions.getString("user"));
What is the result?
Options
- AUser name (US)
- BThe program throws a MissingResourceException.
- CUser name (EN - US)
- DUserName
- EUser name (EN)
Unlock 1Z0-829 to see the answer
You've previewed enough free 1Z0-829 questions. Unlock 1Z0-829 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#ResourceBundle#Locale fallback#naming conventions#localization