Tested, A.
A is correct because it has the complete path for messages compared to others which doesn't have a complete path for the messages which will result to "Can't find bundle for base name" error
A,C,D
A is also correct. see spec :
"Note:The baseName argument should be a fully qualified class name. However, for compatibility with earlier versions, Sun's Java SE Runtime Environments do not verify this, and so it is possible to access PropertyResourceBundles by specifying a path name (using "/") instead of a fully qualified class name (using ".")."
Tested. No answer is correct. A, B and D because of line "String[] names = "Joe", "Jane");" - compilation failed. C is almost correct if we put:
String message = MessageFormat.format(message.getString(“message”),“Joe”,“Jane”);
instead of:
String message = MessageFormat.format(msg.getString(“message”),“Joe”,“Jane”);
D is the correct answer if you have your language set properly
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
dbb65b4
5 months, 1 week agod7bb0b2
1 year agoASPushkin
1 year, 3 months agoOmnisumem
1 year, 4 months agoeldonivan
1 year, 5 months agoMSPORD
1 year, 8 months ago