有什么区别?
public class MyClass<? extends MySuperClass> {
private T data ;
private MyClass<? extends MySuperClass> parent ;
}
和
public class MyClass<T extends MySuperClass> {
private T data ;
// the below line - no compilation errors
private MyClass<? extends MySuperClass> parent ;
// the below line - compilation errors
private MyCLass<T extends MySuperClass> child ;
}
什么时候用什么?