Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 12
    this is not true. They are different. The first can change if the user switches the Locale. The second is the one that is pre-installed on the phone. It never changes no matter what the user does. Commented Nov 1, 2011 at 21:20
  • 16
    Comment by gregm might be false. See answer by airewyre. Commented Jul 26, 2012 at 6:32
  • 5
    @gregm's comment is wrong. Just try it out yourself and you will see, that Locale.getDefault() will change when you change the language in settings. Commented Nov 19, 2014 at 7:07
  • Should see stackoverflow.com/questions/10657747/… Commented Jan 9, 2015 at 10:51
  • Although @gregm's comment is wrong, he still is right those two lines do not need to return the same locale. Just call Locale.setDefault() with some other locale beforehand and you get different results. Commented Feb 12, 2019 at 21:40