// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.ArrayList;
import java.util.List;

public class GenericsNonIssue {
    public static void doSomething(List<A> list) {
        list.add(new C());
    }
    public static void doSomethingElse(List<? extends A> list) {
        //list.add(new C());
        A o = list.get(0);
    }
    public static void main(String[] args) {
        List<B> list = new ArrayList<>();
        //doSomething(list); // do you really want this code to compile??
        doSomethingElse(list);
    }
}

class A {
}

class B extends A {
}

class C extends A {
}
