title: Why does this type cast in Java with a fraction work?
body: <pre><code> double frac = (double) 3/2
  </code></pre>
  
  <p>For the longest time I thought this would only cast the result of the int division to double, but frac has the intended value of 1.5. Why does this work?</p>