diff --git a/src/java.base/share/classes/java/util/Locale.java b/src/java.base/share/classes/java/util/Locale.java index 2beb0f1167381..cd4c9a58b7f2b 100644 --- a/src/java.base/share/classes/java/util/Locale.java +++ b/src/java.base/share/classes/java/util/Locale.java @@ -262,9 +262,10 @@ * *

The default locale is provided mainly for the locale-sensitive methods if no * {@code Locale} is explicitly specified as an argument, such as - * {@link DateFormat#getInstance()}. The default locale is constructed from a few - * system properties, which are determined by the host environment at the Java - * runtime startup. Those system properties are listed below. All but + * {@link DateFormat#getInstance()}. It can be queried by {@link #getDefault()} and + * set by {@link #setDefault(Locale)}. At the Java runtime startup, the default + * locale is constructed from a few system properties, which are determined by the + * host environment. Those system properties are listed below. All but * {@code user.language} are optional. * * @@ -290,18 +291,23 @@ * such as "u-ca-japanese" (Japanese Calendar) * *
Shows property keys and associated values
- * Users can override these system properties by specifying them to the Java + *

Users can override these system properties by specifying them on the Java * launcher's command line in order to customize the default locale independent - * of the host environment. + * of the host environment. Since the system properties are read only at the Java + * runtime startup, altering their values later with + * {@link System#setProperties(Properties)}/{@link System#setProperty(String, String)} + * will have no effect on the established default locale. + * *

There are also finer-grained default locales specific for each * {@link Locale.Category} and corresponding system properties which consist of the * base system properties as listed above, appended by either ".display" or ".format" * depending on the category. For example, setting a value to * {@code user.language.display} system property will have the value for the default - * locale for {@link Locale.Category#DISPLAY} category. - *

Default locales can be queried by {@link #getDefault()} and - * {@link #getDefault(Category)}, and set by {@link #setDefault(Locale)} and - * {@link #setDefault(Category, Locale)}. + * locale for {@link Locale.Category#DISPLAY} category. These category specific default + * locales can also be queried by {@link #getDefault(Category)}, and set by + * {@link #setDefault(Category, Locale)}. In the absence of category specific + * system properties to construct the default locales with, they default to the base + * default locale. * *

Locale Matching

*