I have a parent class A, and its child class B. What is the difference between these two snippets :
public static void main (String[] args) {
ArrayList<? super A> e = new ArrayList<>();
B thing = new B();
e.add(thing);
System.out.println(e.get(0));
}
public static void main (String[] args) {
ArrayList<A> e = new ArrayList<>();
B thing = new B();
e.add(thing);
System.out.println(e.get(0));
}