Why can't I create an array of a generic type?

Viewed 1235

In short, this won't compile:

public <A> void test() {
    A[] temp = new A[]{};
}

Is it because of problems with backward compatibility, or is it something fundamental in the language design that prevents it?

5 Answers
Related