Oracle
1Z0-809 · Question #187
1Z0-809 Question #187: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #187. The question stem and answer options stay visible for context.
Question
Given the content:
MessagesBundle.properties file:
username = Enter User Name
password = Enter Password
MessagesBundle_fr_FR.properties file:
username = Entrez le nom d'utilisateur
password = Entrez le mot de passe
and the code fragment:
Locale currentLocale = new Locale.Builder().setRegion("FR").setLanguage("fr").build();
ResourceBundle messages = ResourceBundle.getBundle("MessagesBundle", currentLocale);
Enumeration<String> names = messages.getKeys();
while (names.hasMoreElements()) {
String key = names.nextElement();
String name = messages.getString(key);
System.out.println(key + " = " + name);
}
What is the result?
Options
- Ausername = Entrez le nom d'utilisateur password = Entrez le mot de passe
- Busername = Enter User Name password = Enter Password
- CA compilation error occurs.
- DThe program prints nothing.
Unlock 1Z0-809 to see the answer
You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 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.