I am new to Java and am from Python. In Python we do string formatting like this:
>>> x = 4 >>> y = 5 >>> print(\"{0} + {1} = {2}\
The MessageFormat class looks like what you're after.
System.out.println(MessageFormat.format("{0} + {1} = {2}", x, y, x + y));