wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Singly Linked List Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Singly Linked List" Watch "Singly Linked List" New topic
Author

Singly Linked List

Emanuel Mensa
Ranch Hand

Joined: Feb 22, 2013
Posts: 31
i am learning about singly linked list now. i really don't get the idea. so i started searching online and found this:

http://www.brpreiss.com/books/opus4/html/page88.html

there it mentions "head" and "tail". would i be right to assume head is the first element in the list and "tail", the last element?

any clarification would be appreciated.
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2251
    
  47
there it mentions "head" and "tail". would i be right to assume head is the first element in the list and "tail", the last element?

Yes that is correct.
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

The concept of a LinkedList is that there are nodes which have 2 parts to them. One part is the data at that node and the other part is the reference to the next node. Read this article.


~ Mansukh
Emanuel Mensa
Ranch Hand

Joined: Feb 22, 2013
Posts: 31
thanks @Tony Docherty, that cleared things up for me
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Singly Linked List