}
class Emp
{
String name;
public Emp(String name)
{
this.name=name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
错误信息如下:
The method addFirst(Emp) is undefined for the type LinkedList
语句:ll.addFirst(emp);
谢谢!