What are the class implementations of List interface in Java?

Java 8Object Oriented ProgrammingProgramming

The List interface extends Collection and declares the behavior of a collection that stores a sequence of elements.

  • Elements can be inserted or accessed by their position in the list, using a zero-based index.
  • A list may contain duplicate elements.
  • In addition to the methods defined by Collection, List defines some of its own, which are summarized in the following table.
  • Several of the list methods will throw an UnsupportedOperationException if the collection cannot be modified, and a ClassCastException is generated when one object is incompatible with another.

Following are the classes that implement List interface.

  • AbstractList
  •  AbstractSequentialList
  • ArrayList
  • AttributeList
  • CopyOnWriteArrayList
  • LinkedList
  • RoleList
  • RoleUnresolvedList
  • Stack
  • Vector
Updated on 25-Feb-2020 09:51:51