Short answer
ArrayList stores elements in a resizable array, giving fast random access but slower inserts/deletes in the middle; LinkedList stores elements as linked nodes, giving fast inserts/deletes but slower random access.
Both implement Java's List interface, so they support the same basic operations, but their internal structure creates very different performance trade-offs.
ArrayList
- Backed by a dynamically resizing array
- Fast random access — get(index) is essentially instant, regardless of list size
- Inserting or removing an element in the middle requires shifting every following element, which is slower for large lists
LinkedList
- Backed by a chain of nodes, each pointing to the next (and previous, for a doubly linked list)
- Fast inserts and removals, especially at the beginning or middle, since it just relinks pointers rather than shifting elements
- Slower random access — reaching a specific index means walking through the chain from the start
In practice, ArrayList is the more commonly used default in Java, since most workloads read more often than they insert into the middle of a list.