how to get index value of an arraylist

hi i have an arraylist and i need to get a index value of a certain element and i am passing that element as a String.... like arraylist.method(string elementname) ..... here for getting the index value of the element which method i have to use... thnx
[287 byte] By [misterraoa] at [2007-10-2 5:37:46]
# 1

arraylist.indexOf(element)

Or do you mean you have a String elementname that is related to an object, so you want to find the object through the use of the related elementname? This sounds like a HashMap would be better than an array list.

Or may be the object should have a name field.

atmguya at 2007-7-16 1:48:14 > top of Java-index,Administration Tools,Sun Connection...
# 2
hithnk you i got the point....
misterraoa at 2007-7-16 1:48:14 > top of Java-index,Administration Tools,Sun Connection...