- An interface that extends the Collections interface.
- An ordered collection (also known as a sequence).
- The user of this interface has precise control over where in the list each element is inserted.
- The user can access elements by their integer index (position in the list), and search for elements in the list.
- Unlike Set, allows duplicate elements.
- Provides a special Iterator called ListIterator for looping through elements of the List.
List extends Collection with additional methods for performing index-based operations:
- void add(int index, Object element)
- boolean addAll(int index, Collection collection)
- Object get(int index)
- int indexOf(Object element)
- int lastIndexOf(Object element)
- Object remove(int index)
- Object set(int index, Object element)
Posted in: