Page 1 of 1

About Question enthuware.ocpjp.v7.2.1452 :

Posted: Wed Aug 20, 2014 12:05 pm
by bluster
The API has the remove() method for the Map interface defined as such:
remove(Object key)
Removes the mapping for a key from this map if it is present (optional operation)
For the Collection interface we get this:
remove(Object o)
Removes a single instance of the specified element from this collection, if it is present (optional operation).
Finally, in option #3 we have this rendering for the method:
remove(Object o)
I ask why the setup above is compatible with the answer "The Map interface defines the methods remove()..." . It would seem that the method as rendered above (and in option #3) is closer to Collection than it is to Map.

Re: About Question enthuware.ocpjp.v7.2.1452 :

Posted: Wed Aug 20, 2014 8:33 pm
by admin
I am not sure I understand your question. If you are talking about key and o, then parameter names are irrelevant.
-Paul.