// 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;

public class GenFun {
    public static void main(String[] args) {
        //ArrayList<Investment> lst = new ArrayList<Stock>();
        ArrayList<? extends Investment> lst = new ArrayList<Stock>();
        lst.add(null);
        lst.remove(0);
    }
}

class Investment {
}

class Stock extends Investment {
}

class Property extends Investment {
}
