Examveda
Examveda

How do you find the index of the last occurrence of a substring in a string in Java?

A. str.findLast(substring)

B. str.lastIndexOf(substring)

C. str.lastIndexOfChar(substring)

D. str.indexOf(substring)

Answer: Option B


This Question Belongs to Java Program >> Strings

Join The Discussion

Related Questions on Strings