Multiple choice

Which of the following functions in Java searches for the last occurrence of a character or a substring?

  1. indexOf()

  2. lastindexOf()

  3. substring()

  4. concat()

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

This function searches for the last occurrence of a character or a substring.