# java编程思想的泛型 15.10 通配符章节有这样一段代码
```
package holder;
public class Holder<T> {
private T value;
public Holder() {
}
public Holder(T val) {
value = val;
}
public T get() {
return value;
}
public void set(T val) {
value = val;
}
}
```
```
package holder;
public class Wildcards {
static <T> T wildSubType(Holder<? extends T> holder, T arg) {
T t = holder.get();
return t;
}
static <T> void wildSuperType(Holder<? super T> holder, T arg) {
holder.set(arg);
Object obj = holder.get();
}
public static void main(String[] args) {
Holder<?> unbounded = new Holder<Long>();
Long lng = 1L;
Object r11 = wildSubType(unbounded, lng);
//The method wildSuperType(Holder<? super T>, T)
//in the type Wildcards is not applicable
//for the arguments (Holder<capture#5-of ?>, Long)
//wildSuperType(unbounded,lng);
}
}
```
为什么wildSubType(Holder<? extends T> holder, T arg) 方法可以接受 Holder<?> 作为参数 而 wildSuperType(Holder<? super T> holder, T arg) 却不能接受H older<?> 按照我自己的理解 应该两个都报错