I have String template
xxxxxxxx xxxxx-xx: [{0}] xxxxxxx xxxxx xxxxxx xxxxxx [{1}] xxxxxx xxxx xxxxx'x xxxxx xxxxxx xxxx [{2}]
Even if I provide all the three arguments still not working
public static void main(String[] args) {
String s = "xxxxxxxx xxxxx-xx: [{0}] xxxxxxx xxxxx xxxxxx xxxxxx [{1}] xxxxxx xxxx xxxxx'x xxxxx xxxxxx xxxx [{2}]";
System.out.println(MessageFormat.format(s,"1","2","3"));
}
The output is :
xxxxxxxx xxxxx-xx: [1] xxxxxxx xxxxx xxxxxx xxxxxx [2] xxxxxx xxxx xxxxxx xxxxx xxxxxx xxxx [{2}]
See output, Its outputting the {2}
instead of 3
, I cannot find why it is not working. Is it a bug or I am missing something ?