Je veux lire l'index (utilisant indexOf)de n'importe quel element
choisi dans une arrayList. J'ai essaye ce code mais sans succes
public E indexOf (int index){
if (index<0 || index>=size)
throw new IndexOutOfBoundsException(""+index);
for(int i=0; i<size;i++ ){
String s =
theArray.get(index);}// error
return theArray[index];
}
Merci d'avance