public class UseLinkList
{
public static void main(String args[])
{
LinkList list=new LinkList(-1);
for(int i=0;i <10;i++)
{
list.insertAtBegin(i);
System.out.println(list.visitAllNode());
}
list.insertAfterId(37,6);
System.out.println(list.visitAllNode());
list.insertAfterId(-1,3);
System.out.println(list.visitAllNode());
if(list.removeAtId(4))
System.out.println(list.visitAllNode());
else
System.out.println( "no ");
list.removeAll();
}
}
错误信息为:UseLinkList.java:5: cannot resolve symbol
symbol : class LinkList
location: class UseLinkList
LinkList list=new LinkList(-1);
------解决方案--------------------
LinkList类没有啊,你自己写的?
------解决方案--------------------
LinkedList
------解决方案--------------------
太大意了吧,应该是LinkedList吧,而且用前也要导入import java.util.*;