how to know the index of word present in array in java code example Example: java indexof array java.util.Arrays.asList(theArray).indexOf(o)