Generic Arrays

Java-Generic Arrays

Generic Arrays It’s also possible to create generic arrays. There are two important generics restrictions that apply to arrays. First, you cannot instantiate an array whose element type is a type parameter. Second, you cannot create an array of type-specific generic references. Following program shows, it’s valid to declare a reference to an array of type T, … Read more…