Multiple choice

Which of the following methods is present in map interface in java collections framework?

  1. boolean 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, as containsKey(object) method is present in the map interface in java collections framework. This method returns true if this map contains a mapping for the specified key.