The Artima Developer Community
Sponsored Link

Java Answers Forum
Need Help in Using LinkedList API implementation

1 reply on 1 page. Most recent reply: Apr 15, 2002 5:35 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Jackie

Posts: 4
Nickname: jackie
Registered: Apr, 2002

Need Help in Using LinkedList API implementation Posted: Apr 15, 2002 1:30 PM
Reply to this message Reply
Advertisement
Hi there,

I'm using the Java API implementation for LinkedList, what i have notice is that my list doesn't seem to be connected with each other.

What I meant about this is that, for instance when I'm reading my infile into the linked list and i tried to display the item within the same file (ie myReadFile file/class), it displays the item properly. But when I tried to access those items from the other files (ie displayItem in my output file/class) it doesn't work.

This happens throughout my program. Im really curious why it's doing this. I thought when using those Java API implementation all i have to do is call the function that i needed (ie Since im using LinkedList: I thought I could just call add(object element), etc and everthing will be alright) mmmm.

Can anyone please clarify this to me, I really need some clarification. Can anyone please tell me the proper way of using these Java API implementations specifically in LinkedList.


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Need Help in Using LinkedList API implementation Posted: Apr 15, 2002 5:35 PM
Reply to this message Reply
It should be pretty straight-forward, but it is hard to tell what your problem is unless you post your code.

Did you look at the thread at
http://www.artima.com/forums/flat.jsp?forum=1&thread=791 -- it sounds a very similar to what you are doing, except you don't need to convert the list to an array. Instead you can simply get an Iterator from the list with iterator(), then cruise through all the items.

Flat View: This topic has 1 reply on 1 page
Topic: how do I create an upload page in Java? Previous Topic   Next Topic Topic: Question for Bill Venners

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use