I am currently now doing a simple linked list program. I have been trying for a week now but the solution seems to have elude me. I can't display the information I have stored into the linked list. Can anyone help me, pleasE?
I have remove the code to update it
Last edited by blazingwolf7; 11-17-2005 at 09:00 AM.
I played with it a bit and it adds stuff now. This is not ready to turn in, however. Please take a look at the difference between your LinkedList constructor and mine, and your main method and mine ...
Thanks a million nspils. It really helps. Now I start to see how it works. Of course. further assistant will be appreciated. But I can start working further now. Thanks.
By the way, just for people who is interested, I forget to increment the variable i in the while loop for the displayInformation() method. However, after I add it, another problem occur. It will only display information in the first nod, nothing else will be display. I wonder why?
Last edited by blazingwolf7; 11-13-2005 at 06:02 AM.
You aren't iterating through your list - there is no "update" of your node whose information you're outputting - a list does not have a "next" method - however, a list's iterator has a next method.
Bookmarks