What is LinkedList class?
- LinkedList class implements the List interface.
- In addition to the List operations, the LinkedList class supports the operations of inserting elements at the beginning and at the end of the list.
- The flexibility of these two methods allows LinkedList class to perform a stack, queue and double-ended queue operations.Syntax:
public class LinkedList<E>
implements List<E>, Deque<E>, Cloneable, Serializable
- Doubly-linked list implementation of the List and Deque interfaces.
- Implements all optional list operations, and permits all elements (including null).
- All of the operations perform as could be expected for a doubly-linked list. Operations that index into the list will traverse the list from the beginning or the end, whichever is closer to the specified index.