Java SE 8 Programmer II — Question 194

You have been asked to create a ResourceBundle which uses a properties file to localize an application.
Which code example specifies valid keys of menu1 and menu2 with values of File Menu and View Menu?

Answer options

Correct answer: D

Explanation

The correct answer is D because it uses the proper format for properties files, which is key=value. Options A and B use XML-like syntax that is not applicable for properties files, while option C does not follow the key-value pair format needed for localization.