Here is my code:
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 than using ArrayList. So why am I seeing below error?
The type List is not generic; it cannot be parameterized with arguments <mynode>
java.util.List?java.util.Listjava.util.List? Or are you accidentally usingjava.awt.List?