Leandro Coutinho wrote:
Ok, but the parse result should be equal to the format, right? The parse documentation says: "Parses text from the beginning of the given string to produce a number. ...", but the result is a wrong number.
Yes, the parse() method should match the format() method. And in this case, it doesn't. You configured it for a region that uses a comma, and then you parsed it with a string that uses a period. Just as the comma is ignored in the US format, the period is ignored in the Brazil format.
As for the double side, that always uses a period. NumberFormat is for the string side only.
Henry