Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pro programmer's opinion needed

Status
Not open for further replies.

jasonwyz98

Programmer
Nov 24, 2003
11
US
Hello

i'm implementing a substitute teacher's class for a school project, and each sub has a list of preferred schools, subjects, etc that they want to teach. My question is that generally is it a good idea to implement a linked list inside the sub class to contain the list. I've decided not to use array since the list may grow in the future. Any opinions are well come

thanks
 
Bear in mind ArrayList is not thread safe, so if you will have multiple or concurrent threads accessing your ArrayList, then you should use Vector, which is synchronized.
 
that's true. but if you need fast iteration and you aren't doing a lot of insertion/deletion, arrayList is preferred. On
the other hand, if you need to perform FAST insertion/deletion, linkedList with elements doubly-linked to one another is preferred.

~za~
You can't bring back a dead thread!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top