To find all of the positions for a single element in an ArrayList, you'll need to convert the list to a
Vector and use the versions of indexOf() or lastIndexOf().
import java.util.Arrays;
import java.util.List;
publicclass MainClass {
publicstaticvoid main(String[] a) {
List list = Arrays.asList(new String[] { "A", "B", "C", "D" });
System.out.println(list.lastIndexOf("A"));
}
}