diff --git a/src/java.base/share/classes/java/text/ChoiceFormat.java b/src/java.base/share/classes/java/text/ChoiceFormat.java index ed49b11bd45..538454d669a 100644 --- a/src/java.base/share/classes/java/text/ChoiceFormat.java +++ b/src/java.base/share/classes/java/text/ChoiceFormat.java @@ -187,6 +187,12 @@ import java.util.Arrays; * * Note:The relation ≤ is not equivalent to <= * + *

If a Relation symbol is to be used within a Format pattern, + * it must be single quoted. For example, + * {@code new ChoiceFormat("1# '#'1 ").format(1)} returns {@code " #1 "}. + * Use two single quotes in a row to produce a literal single quote. For example, + * {@code new ChoiceFormat("1# ''one'' ").format(1)} returns {@code " 'one' "}. + * *

Below is an example of constructing a ChoiceFormat with a pattern: *

* {@snippet lang=java :