nerdexam
Oracle

1Z0-805 · Question #79

Which two code blocks correctly initialize a Locale variable?

The correct answer is D. Locale loc4 = Locale.UK; E. Locale loc5 = new Locale("ru", "RU"). See the full explanation below for the reasoning.

Question

Which two code blocks correctly initialize a Locale variable?

Options

  • ALocale loc1 = "UK";
  • BLocale loc2 = Locale.get Instance ( "ru" );
  • CLocale loc3 = Locale.getLocaleFactory("RU");
  • DLocale loc4 = Locale.UK;
  • ELocale loc5 = new Locale("ru", "RU");

How the community answered

(45 responses)
  • A
    7% (3)
  • B
    2% (1)
  • C
    11% (5)
  • D
    80% (36)

Community Discussion

No community discussion yet for this question.

Full 1Z0-805 Practice