Multiple choice

Which of the following methods is not present in the Java Collections 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, not in Collection interface.