Quote Originally Posted by code_slinger
Thank you, I believe I understand now. So the conversion to double happens after the variable value is "stored"? From your example if you assign speed = 99/10 the 99 and 10 are not converted before the division so the compiler rounds as it would with integers.
Exactly, if you wanted to calculate the exact division you should do speed = 99.0/10.0 or speed = 99/10.0. In the last example the compiler will auto-cast the 99 to double because you divide by a double.