Multiple choice

Which of the following methods is not present in the java collection interface?

  1. RetainAll(collection c)

  2. ToArray()

  3. ContainsAll()

  4. AddAll(Collection c)

  5. First()

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

First() method is present in sortedSet interface and not in collection interface. So this is the correct choice as this method is not present in the collection interface.