I dont argue against the fact that float & double work the same and the fact that care must be taken for both… this is the same between short & int … in case of floatting value care must be taken on the fact they are not made to work as integer and result should never be considered as exact : like better not doing floatComputation() == floatComutation() or similar thing, care must also be taken on NaN result, all that is true for double aswell as float, this was not what I was pointing
my point was rather : double are more precise and without any reason it is not necessary to use float, same apply with int they are more precise than short and without any good reason use int, also double & int have always been both defaut var type for java… and they both are fast
the argument saying double may hide bugs is ?! dont know… strange, funny… astonishing… : float can exacly do the same (work 99.9% of time and a days fail), so do you advice to use something with a lower precision than float to be sure to catch all possible bugs ? 
to be back on topic :
[quote]Currently what’s happening when the car collides is its velocity is reversed and added to its position, which has the effect of undoing the previous move(). (During move() the velocity is added to the position. On a collision, the velocity is subtracted from [its negative added to] the position. So the car is back where it started.) So the code is (inadvertently?) doing exactly what DzzD suggests – undoing the step that led to the collision.
[/quote]
hum not really the same, keeping trace of last pos is different, that’s another funny thing with floatting values (meaning float & double…) as they use dynamic “range of data” => this can be true : a+v-v != a
for example if you add big value with small one :
x=0.01
x+v=1000000.0
x+v-v=0.0
float x=0.01f;
float vx=1000000f;
System.out.println ("x=" + x);
x+=vx;
System.out.println ("x+v=" + x);
x-=vx;
System.out.println ("x+v-v=" + x);
@OP, with float always replace addition by multiplication when possible/applyable :
for example to compute object location with floatting var :
posX=posX0+vx*nbStep
give smarter result than :
posX+=vx


