Hello all
I am newbie in java, I have an arrayList of elements (String), i need to be able to read the index of any element of that list
I have tried that but no good
public E indexOf (int index){
if (index<0 || index>=size)
throw new IndexOutOfBoundsException(""+index);
for(int i=0; i<size;i++ )
if (E[]theArray = theArray[index])
r = theArray[index];
return r;
}
cheers
I am newbie in java, I have an arrayList of elements (String), i need to be able to read the index of any element of that list
I have tried that but no good
public E indexOf (int index){
if (index<0 || index>=size)
throw new IndexOutOfBoundsException(""+index);
for(int i=0; i<size;i++ )
if (E[]theArray = theArray[index])
r = theArray[index];
return r;
}
cheers