add method?
Hi ,this add method reportstwo errors saying "class PubNode not found" and "variable current may not have been initialized" and i havent got a clue why its doing this? can anyone solve this for me?and get it running? please it would make my day!
import java.util.*;
import publicationrecord;
public class PublicationContainer
{
private PubNode list;
PublicationContainer()
{
list = null;
}
//creates a new publication record and adds it to the end of the linked list.
public void add (publicationrecord newpublicationrecord)
{
PubNode node = new PubNode (newpublicationrecord);
PubNode current;
if (list == null)
list = node;
else
{
current = list;
while (current.next != null)
current = current.next;
current.next = node;
}
}
}

