Consider the following example,
List<? super Number> list1 = new ArrayList<>();
list1.add(10);
list1.add(10.10);
list1.add(20.20d);
and another list to which i assign list1
List<? super Integer> list = list1;
System.out.println(list.toString());
Now, when i print the list it contains double values also BUT the list is only supposed to hold Integer and anything above Integer.
If the above is fine then shouldn't the following compile as well ?
list.add(30.30);