title: Java: Can one get printf to show an enum's name?
body: <p>I notice that println() does this, but I cannot get it to work in printf().</p>
  
  <p>In the following snippet, the first two println's give RED and BLUE, then the printf crashes.</p>
  
  <pre><code>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);
  }
  </code></pre>