Class A is of generic type and in class B i want to create an array of objects of type A with Integer as the generic parameter.
class A<T>
{}
class B
{
A<Integer>[] arr=new A[4]; //statement-1
B()
{
for(int i=0;i<arr.length;i++)
arr[i]=new A<Integer>();
}
}
But in statement-1 i get a warning for unchecked conversion. What is the correct way of creating this array so i don't need to use any suppress warnings statement.