This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Trying to learn link list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Trying to learn link list" Watch "Trying to learn link list" New topic

Trying to learn link list

Yafet Negussie

Joined: Mar 17, 2012
Posts: 4
I'm trying to learn link lists. I understand the general concept, but I'm having difficulties implementing simple singly linked list. Here is the code so far, but it doesn't compile... I appreciate any explanations of what I'm doing wrong and how the code is supposed to be implemented.

Junilu Lacar

Joined: Feb 26, 2001
Posts: 4447

Next time, you should post the compiler error message as well; that will help folks help you. On Line 15, you are trying to instantiate a Node with a no-argument constructor. However, as you have written Node, it doesn't have a no-argument constructor.

Junilu - [How to Ask Questions] [How to Answer Questions]
I agree. Here's the link:
subject: Trying to learn link list
Similar Threads
list ADTs
Issues with Linked List Add methods
Test class
Java Linked List
Generic Java - Linked List