lt now equals "3.14, 3.1" objs = null; objs = mf.parse(result, new ParsePosition(0)); // objs now equals {new Double(3.1)}
Likewise, parsing with a MessageFormat object using patterns containing multiple occurrences of the same argument would return the last match. For example,
MessageFormat mf = new MessageFormat("{0}, {0}, {0}"); String forParsing = "x, y, z"; Object[] objs = mf.parse(forParsing, new ParsePosition(0)); // result now equals {new String("z")}
Message formats are not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concurrently, it must be synchronized externally.
@see java.util.Locale
@see Format
@see NumberFormat
@see DecimalFormat
@see ChoiceFormat
@version 1.62, 04/07/06
@author Mark Davis