Multiple choice

Which of the following methods is present in Vector class in Java Collections framework?

  1. removeAllElements()

  2. element()

  3. removeLast()

  4. get(index : int)

  5. set(index,element)

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

This is the correct choice. removeAllElements() method is present in Vector class and is used to remove all the elements from the vector.