I have the following code:
float f = 1.5f;
int i = 3;
i *= f;
I receive no warning, but if I do
i = i*f
I receive an incompatible type warning. Why does Java automatically cast the first multiplication but not the second? What is the reasoning behind this?