So erhalten Sie Index der ArrayList in Java
List aList = new ArrayList();
aList.add("Orange");
aList.add("Apple");
aList.add("Peach");
aList.add("Guava");
aList.add("Mango");
System.out.println("The index of the element Apple in ArrayList is: " +
aList.indexOf("Apple"));
Energetic Eagle