Java OCA OCP Practice Question 2080

Question

How do you find out the locale of the running program?.

  • A. Locale.get("default")
  • B. Locale.get(Locale.DEFAULT)
  • C. Locale.getDefault()
  • D. None of the above


C.

Note

The Locale object provides getDefault() and setDefault() methods for working with the default locale, so Option C is correct.

There is no get() method declared on Locale.




PreviousNext

Related