Back to Unit

Unit 7: ArrayList

AP Computer Science A — Note Packet

0 of 5 blanks filled

Key Terms

ArrayList

A class in the Java utility library that allows you to store a collection of objects, and it automatically ______ itself as you add or remove elements.

Generics

The angle brackets, `<String>`, that tell the `ArrayList` what ______ of objects it's going to hold.

Wrapper Classes

Used to store primitive data types (like `int`, `double`, `boolean`) in an `ArrayList` by converting them to their corresponding ______ types (e.g., `Integer`, `Double`).

add(element)

Adds an element to the ______ of the `ArrayList`.

add(index, element)

Inserts an element at a specific ______, shifting subsequent elements to the right.

1 / 5