Consider the following:
You will get a runtime ArrayStoreException on line 2. This is pretty similar to what you're trying to do with generics only with generics the compiler will catch the exception in compile time and will not let you do it.
If you change line 2 to:
You will no longer get a runtime error. Same thing for if you try to add A to your ArrayList. The reason, i assume and I hope people will correct me if i'm wrong, is that the underlying type of the ArrayList is a A and that's the only type you can add to the list because "?" is a runtime placeholder so basically
Java can't know what you'll put in there but it will know that any thing that comes out of the list when you "get" it will be an A.
HTH