Why is this code valid
ArrayList<?>[] arr = new ArrayList<?>[2];
but the following two are not?
ArrayList<? extends Object>[] arr = new ArrayList<? extends Object>[2];
ArrayList<? super Object>[] arr = new ArrayList<? super Object>[2];
The two last rows generate the compile error;
error: generic array creation.
Please clarify difference.
update
On the other hand ArrayList<?>[] arr = new ArrayList<?>[2];
compiles good but
ArrayList<?> arr = new ArrayList<?>();
not.