<code>Integer x = 5;</code> works because of
- A
Compile error always
- B
Casting
- Ccheck_circle
Autoboxing (int → Integer)
- D
Unboxing
Explanation
Autoboxing converts the int 5 to <code>Integer.valueOf(5)</code>.
AP Computer Science A· difficulty 4/5
<code>Integer x = 5;</code> works because of
Compile error always
Casting
Autoboxing (int → Integer)
Unboxing
Explanation
Autoboxing converts the int 5 to <code>Integer.valueOf(5)</code>.
Want 10 more like this — adaptive to your weak spots?