public synchronized int lastIndexOf(Object object,int location){
  if (location < elementCount) {
    if (object != null) {
      for (int i=location; i >= 0; i--) {
        if (object.equals(elementData[i])) {
          return i;
        }
      }
    }
 else {
      for (int i=location; i >= 0; i--) {
        if (elementData[i] == null) {
          return i;
        }
      }
    }
    return -1;
  }
  throw arrayIndexOutOfBoundsException(location,elementCount);
}

public synchronized int lastIndexOf ( Object object , int location ) { if ( location < elementCount ) { if ( object != null ) { for ( int i = location ; i >= 0 ; i -- ) { if ( object . equals ( elementData [ i ] ) ) { return i ; } } } else { for ( int i = location ; i >= 0 ; i -- ) { if ( elementData [ i ] == null ) { return i ; } } } return - 1 ; } throw arrayIndexOutOfBoundsException ( location , elementCount ) ; }
searches in this vector for the index of the specified object . the search for the object starts at the specified location and moves towards the start of this vector .
