Skip to content
Marlbridge

AP® Computer Science A · Unit 4 · Topic 4.8

ArrayList Methods: Checklist (Computer Science A 4.8)

A self-check for ArrayList methods: creating a list, using size, add, get, set and remove, predicting shifts and return values, and avoiding index errors.

Tick each line when you can do it without looking at the guide. Each line names where it is taught and tested. Revisit the study guide for anything you cannot yet do.

Understanding

  • ☐ I can explain why an ArrayList suits data whose amount is not known in advance (study guide: The problem arrays do not solve).
  • ☐ I can say why the generic form ArrayList is preferred and why the element type cannot be int (study guide: Creating an ArrayList; practice: Question 4).
  • ☐ I can state the valid index range for get, set, remove and for add with an index (study guide: Index rules; practice: Question 3).
  • ☐ I can explain that a list variable holds a reference, so assignment creates an alias (study guide: The list holds references; practice: Question 7).

Skills

  • ☐ I can create a list and import it correctly (study guide: Creating an ArrayList).
  • ☐ I can state what size, add, add with an index, get, set and remove each return (study guide: The methods; practice: Questions 2 and 6).
  • ☐ I can trace a sequence of calls and write the list after each (study guide: Worked examples 1 and 2; practice: Questions 1 and 5).
  • ☐ I can write a method that rearranges a list using get, set, add and remove (study guide: Methods that change a list in a method; practice: Questions 9 and 10).

Reasoning

  • ☐ I can say which calls change the size and which shift elements (study guide: Worked example 1; practice: Question 2).
  • ☐ I can predict an IndexOutOfBoundsException before it happens (practice: Question 3).
  • ☐ I can explain why the order of remove and add matters when moving an element (practice: Question 10).
  • ☐ I can tell ArrayList size() from array length and String length() (study guide: Common misconceptions).

Next: Topic 4.9 ArrayList traversals.

AP® and Advanced Placement® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website. Marlbridge is an independent tuition provider. It is not an authorized AP course provider, an AP school or an exam centre, and these resources are not official College Board materials. Reading them or doing simulations does not meet the laboratory requirement of an AP science course.