KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Possible Duplicate: What are the reasons why Map.get(Object key) is not (fully) generic Java Generics: Why Does Map.get() Ignore Type? Java Map interface is declared like this: Interface Map<K,V> It has such a method: boolean containsKey(Object key) Why not boolean containsKey(K key) ? On the contrary, the List interface has add method that takes parameter of generic type instead of Object : boolean add(E e).
Tags (comma-separated)
Save Edits
Cancel