1Z1-804J Free Dumps Study Materials
Question 9: あ なた はゕ プリ ケー ション をロ ーカ ラ ズす るため の ResourceBundle フゔ ルを 作成 する よう に求
めてき まし た 。
どのコ ード 例は 、 フ ゔ ルメニ ュー と表 示メ ニュ ーの値 で有 効な キーMENU1 と MENU2 を 指定 しま す か 。
A. <key name ="menu1">File Menu</key> <key name ="menu1">View Menu</key>
B. <key> menu1</key><File Menu>File Menu </value> <key> menu1</key><File Menu>View Menu </value>
C. menu1m File menu, menu2, view menu
D. menu1 = File Menu menu2 = View Menu
Correct Answer: D
Explanation:
A properties file is a simple text file. You can create and maintain a properties file with just aboutany 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. In the PropertiesDemo program the base name is
LabelsBundle. Therefore the default properties file is called LabelsBundle.properties. The following
examplefilecontains the following lines: # This is the default LabelsBundle.properties file s1 = computer s2 = disk
s3 = monitor s4 = keyboard Note that in the preceding file the comment lines begin with a pound sign (#). The
other lines contain key-valuepairs. The key is on the left side of the equal sign and the value is on the right. For
instance, s2 is the key thatcorresponds to the value disk. The key is arbitrary. We could have called s2 something
else, like msg5 ordiskID. Once defined, however, the key should not change because it is referenced in the source
code. Thevalues may be changed. In fact, when your localizers create new properties files to accommodate
additionallanguages, they will translate the values into various languages.