Arrays and ArrayLists
- Both are ways to create lists (linear data
structures) with random access.
- Two big differences:
- ArrayLists can grow. Arrays are constructed with a certain
size, and that's it.
- Syntax: arrays use square bracket notation, e.g.,
someArray[index]
.
Alyce Brady, Kalamazoo College