why it is possible to new an array of an interface

Viewed 114

Why the following is possible in Java ?

Integer[] ints = (Integer[])new Comparable[10];

But it gets ClassCastException at runtime. What is the usecase to new an array of an interface.

6 Answers
Related