I want to format decimal values as a currency value: 1234.56d should become "1.234,56" (this format is used in some European countries). I'm using the following pattern to format decimal values:
final DecimalFormat df = new DecimalFormat("###.###.###,00");
final String formatted = df.format(1234.56d);
System.out.println(formatted);
In fact I'm using SuperCSV's class FmtNumber, but that doesn't matter, because the pattern syntax is the same: new FmtNumber("###.###.###,00");
What I get is an IllegalArgumentException with the message "Multiple decimal separators in pattern".
I understand that there can be only one decimal separator. But in my case it should be the sign ",". And "," appears only one time in my pattern.
I searched the Web and StackOverflow for this exception message, but I found no helpful answers.
What's my error?