
public class GenericNode<T> {

	protected T item;
	public GenericNode<T> next;
	
	public GenericNode()
	{
		this.item = null;
		next = null;
	}
	
	public GenericNode(T item)
	{
		this.item = item;
		next = null;
	}
	
	public T getValue() {
		return item;
	}
	
	public void print() {
		System.out.print(item + ", ");
		if (next != null)
			next.print();
	}
}
