<code>Integer i = 7; int n = i + 1;</code> involves
- A
Casting
- B
Autoboxing only
- C
Compile error
- Dcheck_circle
Unboxing (Integer → int)
Explanation
<code>i</code> is unboxed to int 7, then 7 + 1 = 8.
AP Computer Science A· difficulty 4/5
<code>Integer i = 7; int n = i + 1;</code> involves
Casting
Autoboxing only
Compile error
Unboxing (Integer → int)
Explanation
<code>i</code> is unboxed to int 7, then 7 + 1 = 8.
Want 10 more like this — adaptive to your weak spots?