I am really having a tough time understanding the wild card parameter. I have a few questions regarding that.
?
as a type parameter can only
Hmmmm your statement on super
( printAll(MyList super MyClass>)
) is not clear. What it means, assuming Myclass extends Object
is that you can printAll(MyList
and you can printAll(MyList
but nothing else.... it means that the generic type of MyList has to be a superclass (not a subclass) of MyClass. This is different to what you said.
As for the T, E, K, V, or N, well, these are meaningless names in and of themselves. You can use anything you want. Convention suggests single-letter upper-case values though, and T is often used for generic methods, and E for classes....