Please answer to my question.
class parent<T>
{
T ob;
public parent();
ob=new T(); //Giving error for this statement ,Parameterized can not be created
}
Please answer to my question.
class parent<T>
{
T ob;
public parent();
ob=new T(); //Giving error for this statement ,Parameterized can not be created
}
You cannot instantiate type parameters. You might want to read Oracle - Restrictions on Generics