Originally posted by daniel hyslop:
120/0.0 is infinity
Would someone be kind enough to tell me what causes the difference in output when a varialbles initialiser is changed , please
According to Horstman and Cornell in "Core Java", that is the normal behavior for types float and double:
". . . the result of dividing a positive number by 0 is positive infinity."
I think it's probably because floating point numbers always have a limited precision.