I have a quick question as below: Here's a simple examples about this whole issues:
List a = new ArrayList();
List <?> b;
List <? extends Object> c;
According to Java SCJP by khalid mughal (a very good book!):
a = b; // ok. Widening conversion.
b = a; // ok too. No unchecked warning.
b = c; // ok
c = b; // ok
c=a; // ok but now will issue a unchecked warning. // clause 1
I do understand that any raw types (example a) when assigned to any bounded wilcard references, a unchecked warning is issues (since the content in that raw type a could be anything).
My questions is since c is the highest upper bound (? extends objects), shouldn't a be able to assigned to c without that warning?