Tiny howto: printf-like string substitution in Java

JavaI rarely need it, but when I do I usually end up flipping through my copy of Java in a Nutshell hopelessly and randomly, trying to remember to which package it belongs.

So what’s the closest thing in the Java standard library to the C language’s printf? It’s an pathetic little class named MessageFormat.