In Python, when formatting string, I can fill placeholders by name rather than by position, like that:
print \"There\'s an incorrect value \'%(value)s\' in c
public static String format(String format, Map values) {
StringBuilder formatter = new StringBuilder(format);
List
Example:
String format = "My name is ${1}. ${0} ${1}.";
Map values = new HashMap();
values.put("0", "James");
values.put("1", "Bond");
System.out.println(format(format, values)); // My name is Bond. James Bond.