<code>int a = 5; double b = a / 0;</code> results in
- Acheck_circle
ArithmeticException at runtime (integer division)
- B
Compile error
- C
5.0
- D
Infinity
Explanation
Right side evaluates as int/int division by 0 first → ArithmeticException.
AP Computer Science A· difficulty 4/5
<code>int a = 5; double b = a / 0;</code> results in
ArithmeticException at runtime (integer division)
Compile error
5.0
Infinity
Explanation
Right side evaluates as int/int division by 0 first → ArithmeticException.
Want 10 more like this — adaptive to your weak spots?