OCP Question 15, Explanation

You have been asked to create a ResourceBundle which uses a properties file to localize an application. Which code example specifies valid keys of planet and satellite with values of Earth and Moon?

A. Earth
Moon
B. planetEarth
satelliteMoon
C. planet, Earth, satellite, Moon
D. planet = Earth
satellite = Moon

 

The correct answer is D.

 

There are three kinds of separators that may be used in .properties files: equals sign, colon and space. Extra spaces after the separator character are ignored. And that’s it. This knowledge alone will let you answer this exam question correctly.

Prep notes on Localization are here.

Leave Comment

Your email address will not be published.