title: Problem with System.out.printf command in Java
body: <p>I am new to programming so I apologize beforehand.  I am running a program and am having a problem with the <code>System.out.printf</code> method in Java. I know everything else in the program is working correctly (tested it). However this does not seem to work.</p>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.util.IllegalFormatConversionException: d != java.lang.Double<br>
        at java.util.Formatter$FormatSpecifier.failConversion(Unknown Source)<br>
        at java.util.Formatter$FormatSpecifier.printInteger(Unknown Source)<br>
        at java.util.Formatter$FormatSpecifier.print(Unknown Source)<br>
        at java.util.Formatter.format(Unknown Source)<br>
        at java.io.PrintStream.format(Unknown Source)<br>
        at java.io.PrintStream.printf(Unknown Source)<br>
        at Advisor_Score.main(Advisor_Score.java:17)</p>
  </blockquote>
  
  <p>My code is:</p>
  
  <pre><code>import java.lang.Math;
  public class Advisor_Score {
      public static void main(String[] args){ 
          double l[] = {101,1,1,1};
          double k[] = {102,2,2,4};
          double m[] = {103,5,5,5,5,5,5,5};
          double All_users[][]={l,k,m};
          double sum[]=new double [All_users.length];
          double [] raw_advisor=new double [All_users.length];
          double []advisor_score= new double [All_users.length];
          for (int i=0;i&lt;All_users.length;i++){
                  for(int j=1;j&lt;All_users[i].length;j++){
                          sum[i]+=All_users[i][j];
                  }
                  raw_advisor[i]=((sum[i]-(3*(All_users[i].length-1)))/4);
                  advisor_score[i]= 2.5+(2.5*(1-Math.pow(Math.E, -.5*raw_advisor[i])));
                  System.out.printf("%d: %d\n", All_users[i][0], advisor_score[i]);
                  }       
      }
  }
  </code></pre>
  
  <p>Not really sure why it's not working.</p>