integers give an ArithmeticException when division by zero occurs. A float divided by zero will give positive infinity, negative infinity or NaN.
This question does not belong in the JavaRanch forum. The JavaRanch forum is for discussion of the JavaRanch site, not questions about
Java. I'm moving this to Java in General (beginner).