I have a quick question, as shown below: Here are simple examples on all of these issues:
List a = new ArrayList(); List <?> b; List <? extends Object> c;
According to Java SCJP from khalid mughal (a very good book!):
a = b;
I understand that any raw types (example a) when assigning to any restricted links to wilcard with an unanswered warning are problems (since the contents in this raw type can be any).
My questions, since c is the upper upper bound (? Extends objects), should c not be assigned without this warning?
java generics bounded-wildcard
Kim ming yap
source share