diff --git a/src/java.base/share/classes/java/text/DateFormat.java b/src/java.base/share/classes/java/text/DateFormat.java index e0d05d78a28..7bfefc2163a 100644 --- a/src/java.base/share/classes/java/text/DateFormat.java +++ b/src/java.base/share/classes/java/text/DateFormat.java @@ -61,10 +61,12 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * normalization. The date is represented as a {@code Date} object or * as the milliseconds since January 1, 1970, 00:00:00 GMT. * - *
{@code DateFormat} provides many class methods for obtaining default date/time + *
{@code DateFormat} provides static factory methods for obtaining default date/time * formatters based on the default or a given locale and a number of formatting - * styles. The formatting styles include {@link #FULL}, {@link #LONG}, {@link #MEDIUM}, and {@link #SHORT}. More - * detail and examples of using these styles are provided in the method + * styles. The formatting styles include {@link #FULL}, {@link #LONG}, {@link #MEDIUM}, and {@link #SHORT}. + * For any of the factory methods with the parameter style, an {@code + * IllegalArgumentException} will be thrown if style is not equal to any + * of the defined formatting styles. More detail and examples of using these styles are provided in the method * descriptions. * *
{@code DateFormat} helps you to format and parse dates for any locale. @@ -162,7 +164,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * {@code null}, but any subsequent operations on the same instance may throw * {@code NullPointerException}. *