Multiple choice

Which of the following methods is present in Map interface in Java collections framework?

  1. containsKey(object)

  2. containValue(object)

  3. getKey(object)

  4. keysSet(object)

  5. removeKey(object)

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

This is the correct answer. containsKey(object) method is present in the Map interface in Java collections framework. This method returns true if this Map contains a mapping for a specified key. So, this is the correct answer.