Page 1 of 1

About Question enthuware.ocpjp.ii.v11.2.1101 :

Posted: Tue Jul 14, 2020 4:12 pm
by liugengyu
Option B: remove(Object key) returns V, not boolean

Re: About Question enthuware.ocpjp.ii.v11.2.1101 :

Posted: Tue Jul 14, 2020 11:45 pm
by admin
Right. That is why it is not the correct option.

Re: About Question enthuware.ocpjp.ii.v11.2.1101 :

Posted: Fri Jan 01, 2021 8:52 am
by noeloo
The explanation is clear, but only from options description one gets the impression that the methods are atomic in the Map interface.

Re: About Question enthuware.ocpjp.ii.v11.2.1101 :

Posted: Tue Apr 09, 2024 2:16 am
by pavvel
I see boolean remove(Object key, Object value) int specification here:
https://docs.oracle.com/en/java/javase/ ... ntMap.html

But in the answers, it is marked as an incorrect option.
Some kind of confusion.

Re: About Question enthuware.ocpjp.ii.v11.2.1101 :

Posted: Tue Apr 09, 2024 8:07 am
by admin
Yes, but the question asks for methods that are there in ConcurrentMap in addition to Map. The method you have mentioned exists in Map that is why it is not a correct option.