Java casting conversion?
<p>What does java compiler do in this case ?   </p>

<pre><code>for(int i=3;i&lt; Math.sqrt(n);i=i+2) 
</code></pre>

<p><code>Math.sqrt</code> returns a <code>double</code>, so does Javac widen <code>i</code> to a <code>double</code> ? </p>

<p>If I want to use the <code>int</code> value back will i need to re-cast it ? </p>

<p>How does this actually work ?</p>
