Multiple choice

Which of the following methods of Vector class is used to return the index of the last occurrence of an element?

  1. isEmpty()

  2. lastElement()

  3. lastIndexOf()

  4. removeAllElements()

  5. size()

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

This method of Vector class is used to return the index of the last occurrence of element.