I notice that println() does this, but I cannot get it to work in printf().
In the following snippet, the first two println's give RED and BLUE, then the printf crashes.
class Jim {
public enum Colours {BLUE, RED}
static Colours xx = Colours.RED;
public static void main(String[] args) {
Colours fred = Colours.BLUE;
System.out.println(xx);
System.out.println(fred);
System.out.printf("%d, %d\n", fred, xx);
}