Multiple choice

Which of the following methods cannot be invoked with the object of ConcurrentHashMap class?

  1. putIfAbsent(K key, V value)

  2. replace(K key, V oldValue, V newValue)

  3. replace(K key, V value)

  4. containsValue(Object value)

  5. None of these

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

As explained, all the given methods can be invoked from the object of ConcurrentHashMap class. So, this is the correct choice.