public class Organic<E> {
void react(E e) {
}
static void main(String[] args) {
Organic<? super Elem2> compound = new Organic<Elem>();
compound.react(new Elem());
}
}
class Elem {}
class Elem2 extends Elem {}
为什么有编译错误
的方法反应(捕获#1-的?超级elem2时)在类型有机不适用于参数( Elem)
?