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;

}

}

}

[908 byte] By [aidanari] at [2007-9-26 22:59:03]
# 1

What is PubNode and where do you get it from ? (error 1).

error 2:

public void add (publicationrecord newpublicationrecord)

{

PubNode node = new PubNode (newpublicationrecord);

PubNode current = null; // initialize with null

tobias

tobiasleissner at 2007-7-4 3:48:38 > top of Java-index,Archived Forums,Java Programming...