Multiple choice

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

  1. containsKey(object)

  2. containsValue(object)

  3. Get(key : K)

  4. Put(key : K, Value : V)

  5. setValue(Value : V)

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

This is the correct option because setValue(Value : V) method is not present in the map interface, this method is present in the entry interface. This method replaces the value in this entry with a new specified value.