private static int indexOf(Object[] array,int len,Object elt){
  for (int i=0; i < len; i++) {
    if (elt.equals(array[i]))     return i;
  }
  return -1;
}

private static int indexOf ( Object [ ] array , int len , Object elt ) { for ( int i = 0 ; i < len ; i ++ ) { if ( elt . equals ( array [ i ] ) ) return i ; } return - 1 ; }
returns the first index of elt in the array if < len , else - 1 .
