Representation of Singly Linked List in Java ?

By | June 16, 2020

In this post, I will talk about the Representation of Singly Linked List in Java?

Singly LinkedList is a Data Structure used to store the collection of nodes and having the following properties:

  1. It has a sequence of nodes.
  2. Every Node has two parts, the first part is data, and the second part is the reference to the next node in the List.
  3. First Node is called head Node.
  4. Last node always point to NULL

Singly LinkedList

Output of this Program:

10 com.kkjavatutorials.util.LinkedList$Node@7852e922
20 com.kkjavatutorials.util.LinkedList$Node@4e25154f
30 com.kkjavatutorials.util.LinkedList$Node@70dea4e
40 com.kkjavatutorials.util.LinkedList$Node@5c647e05
50 null

This output shows that the last node is pointing to a null reference

You May Also Like:

That’s all about the Representation of Singly Linked List in Java?


If you have any feedback or suggestion please feel free to drop in below comment box.

Leave a Reply

Your email address will not be published. Required fields are marked *