Why is creating an array in a outer parameterized class with a component type being an inner class considered "Generic array creation"?

public class A {

B[] bs = new B[5];

private class B {

}

}

I receive a compile-time error saying that new B[5] is generic array creation. I did not expect this because:

B itself is not parametrized.

B is not a type parameter of A.

With these reasons in mind, why is new B[5] still considered generic array creation?...

Read More »

By: StackOverFlow - 7 days ago

Related Posts