Generic class compiles in Java 6, but not Java 7
I have an interface in Java 6 that compiles correctly: public interface IMultiMap<K, V> extends Map<K, Set<V>> { public int valueSize(); public boolean put(K key, V value); public void clear(Object key); public boolean isEmpty(Object key); } But in Java 7, this interface doesn't compile. I get a compile error on boolean put(K, V) that it has the same erasure as V put(K, V) . The full error from the compiler: error: name clash: put(K#1,V#1) in IMultiMap and put(K#2,V#2) in Map have the same erasure, yet neither overrides the other public boolean put(K key, V value); where K#1,V#1,K#2,V#2 are