What is the List interface?

The List interface provides support for ordered collections of objects.
  • 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.
Additional methods in List Interface:
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)


Enter your email address to get our daily JOBS & INTERVIEW FAQ's Straight to your Inbox.

Make sure to activate your subscription by clicking on the activation link sent to your email