• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Localization and ListResourceBundle

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following question is from a Whizlabs exam.

Given the following properties file.
--------------------------------------
LBundel_fr.properties
Hello=Bonjour
Goodbye=Au revoir
--------------------------------------
Which of the following will create equivalent ListResourceBundle class to above file?
Please select 1 option:

A.


B.

C.

D.

E. None of above.
----------------------------------------------------------------------------------------------------------------------
True: A or E False: B, C, D

Answer: A or E

Note: C, D are false because they extend ResourceBundle when it should be ListResourceBundle.
----------------------------------------------------------------------------------------------------------------------


I believe there is an error for option A in that there is white space before the word Hello.


If the white space is intentional, then the answer is E because you will get


Remove the white space before Hello
in SRBundel_fr.java of option A) and it will print
"Bonjour"

The program that I used for option A. is


Note: The class SRBundel_fr.java has to be added to the package
com.java.localization
in order for the class RB.java to locate SRBundel_fr.java.

Conclusion:
If the white space is intentional then the answer is
E. None of above.

If the white space is a typographical error, then the answer is A based on the output above.

Any feedback would be appreciated.

 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looking at the other answer choices, some of them do have the white space in front. Hence I personally think the white space is intentional. Therefore the answer I would choose is E.
 
reply
    Bookmark Topic Watch Topic
  • New Topic