Dividing the value intby zero will result in ArithmeticException, so the expression 1 / 0is illegal.
The result of dividing the value doubleby zero is infinity or NaN * , so the expression 1.0 / 0.0is legal.
*) See t_over comment for specifics:
source
share