Separation 1.0 / 0.0: output infinite
The first case is treated as division by double, and later as division by int, and therefore an ArthimeticException.
That's what infinity means
http://docs.oracle.com/javase/7/docs/api/java/lang/Double.html#POSITIVE_INFINITY
The separation of doubles and floats follows the IEEE 754 standard for floating point matching, which should not throw an exception.
source to share
Mathematically, division by zero is undefined, although it can be considered unconscious. (With a little more stringency, this is a number greater than x for any value of x.)
IEEE754 double floating point (used by Java) has infinity representation. This is a 1.0 / 0.0 result. In this sense, 1.0 / 0.0 is computed as it is in floating point arithmetic.
The integral type has no infinity representation, so an exception is thrown. 1 / 0
calculated in integer arithmetic.
source to share