<code>list.add(5);</code> (where list is ArrayList<Integer>)
- Acheck_circle
Autoboxes 5 to Integer.valueOf(5)
- B
Stores int directly
- C
Throws exception
- D
Compile error
Explanation
Autoboxing converts int to Integer.
AP Computer Science A· difficulty 4/5
<code>list.add(5);</code> (where list is ArrayList<Integer>)
Autoboxes 5 to Integer.valueOf(5)
Stores int directly
Throws exception
Compile error
Explanation
Autoboxing converts int to Integer.
Want 10 more like this — adaptive to your weak spots?