java.text.MessageFormat

With MessageFormat, we can output String with parameters:

MessageFormat:

private static final String FAILURE = "#ERROR: FAILED TO LOCALIZE {0}";

String value = MessageFormat.format(FAILURE, new Object[] { new Integer(1) }); 

原文地址:https://www.cnblogs.com/kevinge/p/1787590.html