1Z0-805 · Question #64
You have been asked to create a ResourceBundle file to localize an application. Which code example specifies valid keys of menu1 and menu2 with values of File Menu and View Menu?
The correct answer is D. menu1 = File Menu. A properties file is a simple text file. You can create and maintain a properties file with just about any text editor. You should always create a default properties file. The name of this file begins with the base name of your ResourceBundle and ends with the .properties…
Question
You have been asked to create a ResourceBundle file to localize an application. Which code example specifies valid keys of menu1 and menu2 with values of File Menu and View Menu?
Options
- A<Key name = "menu1">File Menu</Key>
- B<Key>menu1</key><value>File Menu </value>
- Cmenu1, File Menu, menu2, View Menu
- Dmenu1 = File Menu
How the community answered
(42 responses)- A12% (5)
- B5% (2)
- C2% (1)
- D81% (34)
Explanation
A properties file is a simple text file. You can create and maintain a properties file with just about any text editor. You should always create a default properties file. The name of this file begins with the base name of your ResourceBundle and ends with the .properties suffix. An example of the contents of a ResourceBundle file: # This is a comment Note that in the preceding file the comment lines begin with a pound sign (#). The other lines contain key-value pairs. The key is on the left side of the equal sign and the value is on the right. For instance, s2 is the key that corresponds to the value disk. The key is arbitrary. We could have called s2 something else, like msg5 or diskID. Once defined, however, the key should not change because it is referenced in the source code. The values may be changed. In fact, when your localizers create new properties files to accommodate additional languages, they will translate the values into various languages.
Topics
Community Discussion
No community discussion yet for this question.