LinkedList in Java is a linear data structure (like a  stack), but instead of storage of data elements contiguous, each item of LinkedList is stored separately with the help of pointer. The data structure is a fast and efficient way to store and organize data. Each item is known as a node, and the node consists of two parts-data part and the pointer part. Every pointer points to the address of the next node. The last node of the LinkedList points to NULL.

LinkedList in Java

In Java, the LinkedList class implements the List interface, and this class uses a doubly linked list to store the data elements.

See the following figure.

LinkedList in Java

Unlike a regular linked list, the doubly linked list consists of there part in each node- previous pointerdata part, and next pointer.

Java LinkedList Tutorial

#java #linkedlist #java linkedlist

LinkedList in Java Example | Java LinkedList Tutorial
3.00 GEEK