// 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 Instance {
    private static final long N = 10000000000L;
    public static void main(String[] args) throws Exception {
        List<Integer> o = new ArrayList<Integer>();
        long t1 = System.currentTimeMillis();
        for(long i = 0; i < N; i++) {
            boolean b = o instanceof ArrayList<?>;
            if(!b) throw new Exception("Ooops");
        }
        long t2 = System.currentTimeMillis();
        System.out.println(t2-t1);
        long t3 = System.currentTimeMillis();
        for(long i = 0; i < N; i++) {
            boolean b = ArrayList.class.isInstance(o);
            if(!b) throw new Exception("Ooops");
        }
        long t4 = System.currentTimeMillis();
        System.out.println(t4-t3);
    }
}
