+ 2
Division by zero (Java)
What is the output of this code? double d = 33.44 / 0.0; System.out.println(d);
2 Respuestas
+ 3
If d was int, Java would throw an ArithmeticException. But here, d is float so division by zero returns Infinity.
+ 5
Try it yourself, in Java Editor, in sololearn