I am trying to replace the {0} in a String with a value. The code I have written for it is:
String formattedText = MessageFormat.format("'{0}'", "1");
System.out.println(formattedText);
It is giving the output as : {0}
Please let me know what I am doing wrong.