title: How to print the value of variable in java
body: <pre><code>System.out.printf("The Sum is %d%n" , sum);
  </code></pre>
  
  <p>and the error is 
  The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, int)</p>
  
  <pre><code>System.out.printf("The sum is " + sum);
  </code></pre>
  
  <p>Works but What if i need to print</p>
  
  <blockquote>
    <p>"The Sum of 5 and 6 is 11"</p>
  </blockquote>
  
  <pre><code>System.out.printf("The sum of %d and %d  is %d . " ,a,b,sum);
  </code></pre>
  
  <p>But got the above error on Eclipse Platform Version: 3.8.1 (Ubuntu)</p>