class Generic<T> {}
Generic<Object>[] gib;
gib = new Generic<Object>[5]; // here is the line throwing Generic array creation error
I don't understand why this sample should be considered generic array creation, because the generic array creation I've seen so far is created in the form like Generic<T>[SIZE]
, with an unknown type parameter. But in this sample, I explicitly set the type parameter to Object
, I guess my understanding of generic array must have some flaws, hope someone could help.