title: Java primitive types promotion confusion
body: <p>I am new to this as you may be able to tell, please clarify to a beginner how the following code snipped outputs -2.50 as the answer. I'm still very confused around the promotion/demotion subject in terms of int -> double.</p>
  
  <pre><code>    int x = 5;
      double y = 2.5;
      double q = x / 10 - y;
      System.out.printf("%.2f\n",q);
  </code></pre>
  
  <p>The way I see it is: double q = 5.0 (x promoted to double from int) / 10.0 - 2.5
  Which would be equal to 0.5 - 2.5 = -2.00 (2 decimal places because of "%.2f\n")</p>
  
  <p>Why is the correct answer -2.50 and not -2.00?</p>