Searches the array backwards for the specified object, starting from the specified index, and returns an index to it. The object equality is tested using the Java java.lang.Object.equals() method.

Returns -1 if the object is not found.

Parameters:

a

The array to be searched in.
obj
The object to search for.

If this parameter is null, the function will seek the occurence of null element.

fromIndex
The index to start the search from. If not specified, the last element is assumed.

See Also:

indexOf()
Tip:

You may call this function in a method-like style:

a.lastIndexOf(obj,fromIndex)