public static int indexOf(Object[] array,Object objectToFind){
  if (array == null || array.length == 0 || objectToFind == null) {
    return -1;
  }
  for (int i=0; i < array.length; i++) {
    Object obj=array[i];
    if (obj.equals(objectToFind)) {
      return i;
    }
  }
  return -1;
}

public static int indexOf ( Object [ ] array , Object objectToFind ) { if ( array == null || array . length == 0 || objectToFind == null ) { return - 1 ; } for ( int i = 0 ; i < array . length ; i ++ ) { Object obj = array [ i ] ; if ( obj . equals ( objectToFind ) ) { return i ; } } return - 1 ; }
get the index of an object
