How do we retrieve the fifth element of an ArrayList?
Perfect! Like arrays, ArrayLists are zero-based but they differ in that they have methods like get()
to retrieve elements.
Not quite! Like arrays, ArrayLists are zero-based but they differ in that they have methods like get()
to retrieve elements.