What are the reasons behind the decision to not have a fully generic get method
in the interface of java.util.Map<K, V>.

To clarify the question, the signature of the method is

V get(Object key)

instead of

V get(K key)

and I’m wondering why (same thing for remove, containsKey, containsValue).

11 Answers
11

Leave a Reply

Your email address will not be published. Required fields are marked *