Java List indexOf method

There is a very important method indexOf which is part of the List interface. The description in Java documentation states: “Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or … Read more