N
nramnath
Hi,
I want to store a Generic class in a non generic class. Is it possible
??
public class A<T>
{
T t ;
public T getValue()
{
return t;
}
}
public class B
{
A a; // How to declare generic A here
public <T> A<T> getA()
{
return a;
}
}
I know this will not work. Is there a way I can get it working with
wildcards.
I am not 100% clear with generic - Is it possible at all??
I want to store a Generic class in a non generic class. Is it possible
??
public class A<T>
{
T t ;
public T getValue()
{
return t;
}
}
public class B
{
A a; // How to declare generic A here
public <T> A<T> getA()
{
return a;
}
}
I know this will not work. Is there a way I can get it working with
wildcards.
I am not 100% clear with generic - Is it possible at all??