About Question enthuware.ocpjp.v8.2.1101
Posted: Fri Dec 18, 2015 1:21 pm
Which of the following methods are available in java.util.concurrent.ConcurrentMap in addition to the methods provided by java.util.Map?
You answered: boolean remove(Object key, Object value),
V putIfAbsent(K key, V value),
boolean replace(K key, V oldValue, V newValue)
But since java 1.8, all of them are also found in Map interface as a default methods. Please give an explanation on this?
Thank you.
You answered: boolean remove(Object key, Object value),
V putIfAbsent(K key, V value),
boolean replace(K key, V oldValue, V newValue)
But since java 1.8, all of them are also found in Map interface as a default methods. Please give an explanation on this?
Thank you.