8315064: j.text.ChoiceFormat provides no specification on quoting behavior

Reviewed-by: naoto
This commit is contained in:
Justin Lu 2023-10-19 22:53:07 +00:00
parent 1740950036
commit 684b91efbb

@ -187,6 +187,12 @@ import java.util.Arrays;
*
* <i>Note:The relation &le; is not equivalent to &lt;&equals;</i>
*
* <p>If a <i>Relation</i> symbol is to be used within a <i>Format</i> 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' "}.
*
* <p>Below is an example of constructing a ChoiceFormat with a pattern:
* <blockquote>
* {@snippet lang=java :