public int lastIndexOf (String str)

Returns the index within this string of the last occurrence of the specified substring. The last occurrence of the empty string "" is considered to occur at the index value this.length().

The returned index is the largest value k for which:

 this.startsWith(str, k)
 
If no such value of k exists, then -1 is returned.

Parameters:
str    the substring to search for.

Returns:  the index of the last occurrence of the specified substring, or -1 if there is no such occurrence.