title: Java printf gives "change type to Object" error
body: <p>For some reason, in Eclipse, I get the error "change type of 'i' to 'Object[]'" for the "format" here:</p>
  
  <pre><code>int i = 461012;
  System.out.format("The value of i is: %d%n", i);
  </code></pre>
  
  <p>I experience this error with JDK 7 and 8 (I tried reinstalling both in turn, and I tried the latest eclipse download, just to be safe).  </p>
  
  <p>I'm very confused as to why I can't use an int here.  This example comes directly from the Oracle documentation for format.  printf gives the same error.  </p>
  
  <p>Something so simple should be robust and reliable, one would think.  </p>
  
  <p>ON EDIT:</p>
  
  <p>Sorry, here's the entire code that doesn't work for me.</p>
  
  <pre><code>public class Main {
  
      public static void main(String[] args) {
          int i = 461012;
          System.out.format("The value of i is: %d%n", i);
  
      }
  
  }
  </code></pre>
  
  <p>And here's exactly what I see in Eclipse when I hover over "format" with the mouse:</p>
  
  <blockquote>
    <p>The method format(String, Object[]) in the type PrintStream is not
    applicable for the arguments (String, int)</p>
    
    <p>1 quick fix available:</p>
    
    <p>Change type of 'i' to 'Object[]'.</p>
  </blockquote>
  
  <p>Does that help?</p>