Substitute tokens in a StringTag(s): String/Number


Object[] params = new Object[]{"hello", "!"};
String msg = MessageFormat.format("{0} world {1]", params);
// hello world !
java.text.MessageFormat is a very powerful API, you should study the javadoc to see all the possibilities.
blog comments powered by Disqus