Is it possible to create reference variables of arrays of generic types like:
, I found that we can declare a reference variable of an array type whose component type generic. But all such variable can refer is null, an array whose component type is a non-parametrized subtype of the reference variable component type or corresponding raw type (List).
But when I try to declare reference variable to an array of generic type I get an error that "arrays of generic types are not allowed". I know they are not but the FAQ says that declaration of a reference variable to an array of generic type IS allowed. Can someone check is this true. My compiler rejects such declaration. I have 1.5.0-beta version and I compile with -source 1.5 flag.
One more question. Do I have to learn all the details of generics in order to pass SCJP 1.5? I have read K&B book, but the chapter about generics is too short and doesn't explain generics in detail. I had problems with questions about generics on the self test after the chapter. So I decided I have to strengthen this objective and I found this useful FAQ
. But it is so big. Do I have to know all the details about type erasure, bridge methods or subsuitable return types for the SCJP? Do you have a link to generics tutorial that is not so advanced but enough to pass SCJP?
[ August 29, 2007: Message edited by: Jan Nowak ]