Which two statements are a valid way to re-assign a resource bundle to a different Locale?

Given the code fragment:
<code>
Locale loc1 = Locale.getDefault ();
ResourceBundle messages = ResourceBundle.getBundle(“MessageBundle”, loc1);
</code>
Which two statements are a valid way to re-assign a resource bundle to a different Locale?

Given the code fragment:

Locale loc1 = Locale.getDefault ();
ResourceBundle messages = ResourceBundle.getBundle("MessageBundle", loc1);

Which two statements are a valid way to re-assign a resource bundle to a different Locale?

A.
loc1 = ResourceBundle.getBundle (“MessageBundle”, Locale.CHINA);

B.
loc1 = ResourceBundle.getBundle (“MessageBundle”, new Locale (“es”, “ES”));

C.
messages = ResourceBundle.getBundle (“messageBundle”, new Locale (“es”, “ES”));

D.
messages = ResourceBundle.getBundle (“MessageBundle”, Locale.CHINA);



Leave a Reply 0

Your email address will not be published. Required fields are marked *