Understanding upper and lower bounds on ? in Java Generics
? as a type parameter can only be used in methods. eg: printAll(MyList<? extends Serializable>) I cannot define classes with ? as type parameter. A wildcard (?) isn’t a formal type parameter, but rather can be used as a type argument. In the example you give, ? extends Serializable is given as a type argument …