Multiple choice

Which of the following methods in string class of java searches for the last occurrence of a character or substring?

  1. indexOf()

  2. substring()

  3. lastIndexOf()

  4. none of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This method in string class of java searches for the last occurrence of a character or substring.