Originally posted by JB Ramesh:
does anyone know the reason behind this ?
Why arithmetic exception happens for int and not for float ?
The behavior of float is actually defined by the IEEE standard.
Java follows the same standard used by most floating point processors in use today.
As for int, it throws an exception, because there is no representation for infinity or NaN.
Henry