Just to add, we can rewrite the code as below
List> asListA = Arrays.asList(B.class, A.class);
List> asListB = Arrays.asList(B.class);
List> numbers = asListA;
List> numbers2 = asListB; // it will fail here
And @Inerdia explained the details already.