When compiling source code with generic types, the Java compiler automatically erases the type, replacing general declarations with the corresponding source types.
According to Oracle docs, this erase replaces the top related wildcard character <? extends T> <? extends T> on T. This is consistent with dynamic polymorphism.
But how is this erasure done for the lower bounded wildcard <? super T> <? super T> , seeing that each class has a common superclass (Object), using which will defeat the whole goal?
source share