Possible Duplicate:
What is the easiest alternative to a generic array in Java?
I have the following code:
class B<X>
{
    public void create()
    {
        List<X> l1 = new ArrayList<X>(); //No ERROR
        X[] arrr = new X[10];   //ERROR
    }
}
I know that I cannot instantiate a Generic array due to type erasure. But why can I instantiate an instance of a generic List?
 
     
     
    