indexOf : if you want to get the index of an object existing in Java ArrayList, you can use this method Predefined :

ArrayList<String> list = new ArrayList<>();
int index = list.indexOf(Object);  // return int 


  1. Pingback: Difference between ArrayList and LinkedList in Java » JavaTuto

  2. Pingback: (SOLVED) How to get file extension in Java ? » JavaTuto

Laisser un commentaire