Tuesday, 27 August 2013

Using List or ArrayList in java

Using List or ArrayList in java

class mynode
{
mynode prev;
mynode next;
int value;
}
class link
{
List<mynode> pos;
link(int x)
{
pos = new ArrayList<mynode>();
}
}
I have seen here that using List is better. So Why am I seeing below error?
The type List is not generic; it cannot be parameterized with arguments
<mynode>

No comments:

Post a Comment