<code>int x = 5 / 0;</code> causes
- Acheck_circle
ArithmeticException at runtime
- B
Compile error
- C
x = 0
- D
x = Infinity
Explanation
Integer division by zero throws <code>ArithmeticException</code> (compiles fine).
AP Computer Science A· difficulty 3/5
<code>int x = 5 / 0;</code> causes
ArithmeticException at runtime
Compile error
x = 0
x = Infinity
Explanation
Integer division by zero throws <code>ArithmeticException</code> (compiles fine).
Want 10 more like this — adaptive to your weak spots?