PDA

View Full Version : Java ArrayList... cant find the answer to this question anywhere!!



mcweaver1
January 18th, 2009, 10:21 AM
Hello anybody reading this!

For a bit of background I'm storing a whole load of strings in an ArrayList, each element in the list being one word.

I've been trying for ages to find a way to calculate the position in the arraylist that each element is stored in, but to no avail.... is it even possible? Does anybody know how? I would really appreciate a bit of help on this...!

Cheers :)

mcweaver1
January 18th, 2009, 10:32 AM
Sorry sorry, never mind, i just worked out a way to solve it.

DocForbin
January 18th, 2009, 10:57 AM
myList.indexOf("word")

I imagine you are trying to do something more than that...