I\'m not sure why the last statement in the following code is illegal. Integer should be a subtype of ?, so why can\'t I assign it to b
Integer
?
b
Integer is not a subtype of ? (necessarily). ? is a wildcard; you should interpret it as meaning "unknown".
So a List> is not the same as a List. You can add anything you like to a List.
List>
List