What is the main difference between an ArrayList and a LinkedList in Java?
An ArrayList stores elements as nodes in a linked structure, while a LinkedList stores elements in an array.
You're close, but you've confused the internal structure. An ArrayList is actually backed by an array, not a linked structure.
Can you explain how elements are physically stored in both ArrayList and LinkedList?