nerdexam
Oracle

1Z0-809 · Question #243

1Z0-809 Question #243: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #243. The question stem and answer options stay visible for context.

Question

Given the greetings.properties file, containing: HELLO_MSG = Hello, everyone! GOODBYE_MSG = Goodbye everyone! and given: import java.util.Enumeration; import java.util.Locale; import java.util.ResourceBundle; public class ResourceApp { public void loadResourceBundle() { ResourceBundle resource = ResourceBundle.getBundle("Greetings", Locale.US); System.out.println(resource.getObject(1)); } public static void main(String[] args) { new ResourceApp().loadResourceBundle(); } } What is the result?

Options

  • ACompilation fails.
  • BGOODBY_MSG
  • CHello, everyone!
  • DGoodbye everyone!
  • EHELLO_MSG

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.

Full 1Z0-809 Practice