I teach Computer Science AP and we use java to teach programming concepts. One thing my students and I have noticed is that the following code gives a Loss of precision error:
int j = 0;
j = j + 4.0;
however this code does not:
int j = 0
j += 4.0;
To me, these are the same thing. I have searched for some posting to answer this but could not find anything If you have a link to a post that explains this, my students and I would appreciate it. Thanks!