LinkedList:

The LinkedList class extends AbstractSequentialList and implements the List and Deque interface. It uses linked list data structure to store elements. It can contain duplicate elements. It is not synchronized.

Note: It not provides the random access facility.

Following methods are used to get first element in linked list in java:

element(): Retrieves, but does not remove, the head (first element) of this list.

getFirst(): Returns the first element in this list.

peek(): Retrieves, but does not remove, the head (first element) of this list.

peekFirst(): Retrieves, but does not remove, the first element of this list, or returns null if this list is empty.