By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,101 Members | 1,340 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,101 IT Pros & Developers. It's quick & easy.

array to linklist

P: n/a
I'm stuck

I have to convert an array to a linklist

the array is initialized as

public Organization{
Crew[] members = new Member [10]

etc....

}
I'm trying to get it setup where Crew holds it's members in a linkedlist
this is what I have so far.
public Organization{
private Link beforeAll = new Link(null,null);

etc...
}

I just can't figure out how to convert it.
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
jova wrote:
I'm stuck

I have to convert an array to a linklist

the array is initialized as

public Organization{
Crew[] members = new Member [10]

etc....

}
I'm trying to get it setup where Crew holds it's members in a linkedlist
this is what I have so far.
public Organization{
private Link beforeAll = new Link(null,null);

etc...
}

I just can't figure out how to convert it.


This smells like homework. Are you allowed to use the containers
supplied by the JDK? If so, you should look at the javadoc for
java.util.LinkedList.

Ray
Jul 17 '05 #2

P: n/a
yes it is homework and no I don't think I can use Containers since we never
cover that in class.
"Raymond DeCampo" <rd******@spam-I-am-not.twcny.rr.com> wrote in message
news:uO*******************@twister.nyroc.rr.com...
jova wrote:
I'm stuck

I have to convert an array to a linklist

the array is initialized as

public Organization{
Crew[] members = new Member [10]

etc....

}
I'm trying to get it setup where Crew holds it's members in a linkedlist

this is what I have so far.
public Organization{
private Link beforeAll = new Link(null,null);

etc...
}

I just can't figure out how to convert it.


This smells like homework. Are you allowed to use the containers
supplied by the JDK? If so, you should look at the javadoc for
java.util.LinkedList.

Ray

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.