About Question enthuware.ocpjp.v7.2.1452 :
Posted: Wed Aug 20, 2014 12:05 pm
The API has the remove() method for the Map interface defined as such:
For the Collection interface we get this:remove(Object key)
Removes the mapping for a key from this map if it is present (optional operation)
Finally, in option #3 we have this rendering for the method:remove(Object o)
Removes a single instance of the specified element from this collection, if it is present (optional operation).
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.remove(Object o)