Exam 1z0-809 All QuestionsBrowse all questions from this exam
Question 147

Given the Greetings.properties file, containing:

and given:

What is the result?

    Correct Answer: A

    The code will fail to compile because the getObject method in the ResourceBundle class requires a String argument, not an int argument. Therefore, passing an integer value to getObject will cause a compilation error since the method getObject(int) does not exist.

Discussion
jduarteOption: A

Answer A. Tested he method getObject(String) in the type ResourceBundle is not applicable for the arguments (int)

steefaandOption: A

A is correct since getObject takes String argument and not int.