how to get the first index of an array element in java code example Example: java indexof array java.util.Arrays.asList(theArray).indexOf(o)