1

Possible Duplicate:
What are the reasons why Map.get(Object key) is not (fully) generic
Java Generics: Why Does Map.get() Ignore Type?

Is there any reason why we do not have

Map.get(K key) 

But we have

Map.get(Object key) 

Isn't the generic version will be better, so that we can perform compile time checking?

Community
  • 1
  • 1
Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875

0 Answers0