To add 5 to the end of ArrayList<Integer> list:
- A
list[5] = 5;
- Bcheck_circle
list.add(5);
- C
list = list + 5;
- D
list.append(5);
Explanation
Use <code>add(value)</code> to append.
AP Computer Science A· difficulty 2/5
To add 5 to the end of ArrayList<Integer> list:
list[5] = 5;
list.add(5);
list = list + 5;
list.append(5);
Explanation
Use <code>add(value)</code> to append.
Want 10 more like this — adaptive to your weak spots?