| Exam Code/Number: | 1Z0-816Join the discussion |
| Exam Name: | Java SE 11 Programmer II |
| Certification: | Oracle |
| Question Number: | 80 |
| Publish Date: | Aug 29, 2026 |
|
Rating
100%
|
|
Which two statements independently compile? (Choose two.)
Given the contents:
MessageBundle.properties file:
message=Hello
MessageBundle_en.properties file:
message=Hello (en)
MessageBundle_US.properties file:
message=Hello (US)
MessageBundle_en_US.properties file:
message=Hello (en_US)
MessageBundle_fr_FR.properties file:
message=Bonjour
and the code fragment:
Locale.setDefault(Locale.FRANCE);
Locale currentLocale = new Locale.Builder().setLanguage("en").build();
ResourceBundle messages = ResourceBundle.getBundle("MessageBundle", currentLocale); System.out. println(messages.getString("message")); Which file will display the content on executing the code fragment?
Given:
What code must you insert on Line 1 to enable the code to print Hello world?
Given:
Which statement on line 1 enables this code fragment to compile?
Given:
Which is true about line 1?