Java OCA OCP Practice Question 2086

Question

How long will the effects of calling Locale.setDefault() be active assuming no other calls to that method are made?

  • A. Until the end of the method
  • B. Until the program exits
  • C. Until the next reboot of the computer
  • D. None of the above. It persists even past a reboot.


B.

Note

Calling Locale.setDefault() changes the default locale within the program.

It does not change any settings on the computer.

The next time you run a Java program, it will have the original default locale rather than the one you changed it to.




PreviousNext

Related