Singly Linked List in Java Programming
In this lesson, we will understand what is Singly Linked List in Java Programming and how to create them along with some examples.
What is Singly Linked List in Java
A Singly Linked List in Java is a data structure where data is stored in structures called nodes. Each node has two parts: the data part, which stores the data, and the pointer part, which stores the memory address of the next node in the list, as shown in the image below.
In the above image, start is a pointer to a structure that stores the memory address of the first node.
The first node consists of two parts: the data part and the next part. The next part stores the memory address of the subsequent node.
In a singly linked list, data is not stored in contiguous memory locations. A new node can be created anywhere in memory at runtime.
We can create additional nodes as needed by linking each newly created node to the last node in the list.
The above memory addresses are imaginary and used for explaining singly linked list. Actual addresses can vary from computer to computer.
Unlock This Lesson & Start Learning!
Get full access to this lesson, practical exercises, quizzes, and your Mentora AI Tutor.
Special Offer, use coupon code DWL6BC to get additional discount of 10% on all subscription. Hurry limited time offer.
1 Month
Renews at ₹259/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor
3 Months
Equivalent to ₹219.67/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor
6 Months
Equivalent to ₹193.17/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor
12 Months
Equivalent to ₹179.92/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor