FormatPluralsChoicepublic class FormatPluralsChoice extends FormatPlurals Format a plural correctly, using a ChoiceFormat. |
Fields Summary |
---|
static double[] | limits | static String[] | formats | static ChoiceFormat | myFormat |
Methods Summary |
---|
public static void | main(java.lang.String[] argv)
report(0);
report(1);
report(2);
| public static void | report(int n)report -- using conditional operator
System.out.println("We used " + n + " " + myFormat.format(n));
|
|