Promotion in java : <p>I exectued this statement</p>

<pre><code>System.out.println(3.0 + 5/2); 
</code></pre>

<p>And found the answer to be 5.0.
Now according to promotion, if an expression contains a double type data, every operand will be promoted to double type. So 5 and 2 will be promoted to 5.0 and 2.0 respectively. Therefore the logical expression here should be </p>

<pre><code>3.0+5.0/2.0
</code></pre>

<p>Which should give the answer 5.5 instead of 5.0.</p>
