title: Java: Why doesn't (int) += (double) cause a "incompatible types" error?
body: <p>Here's an oddity:</p>
  
  <pre><code>float a = 0;
  a = a + Math.PI; // ERROR
  </code></pre>
  
  <p>and yet:</p>
  
  <pre><code>a += Math.PI; // OK!
  </code></pre>
  
  <p>even this works:</p>
  
  <pre><code>int b = 0;
  b += Math.PI; // OK, too!
  </code></pre>
  
  <p>Why does the <code>+=</code> operator allow lossy implicit type conversions?</p>