Multiple choice

Which of the following methods are not present in Collection interface?

  1. retainAll(Collection<!--?--> c)

  2. containsAll(Collection<!--?--> c)

  3. toArray(T[] a)

  4. firstEntry()

  5. equals(Object o)

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

This is the correct choice because firstEntry() method is not present in Collection interface. It is used for map interface and its classes. This method returns a key-value mapping associated with the least key in this map, or null if the map is empty. So this is the correct choice.