I have the following code in JAVA :
List <? extends Number > l3=new List<Number>() ; // List not allowed ? why . and why arrayList is allowed here
Integer i=new Integer(5);
l3.add(i); // why we can not add i to l3 .
//------------- another thing :
List <?> variablex;
variablex.add(new Integer(5) ); // error ? so why ?
I am wondered why I have these errors at compile time ?