UNB/ CS/ David Bremner/ teaching/ java/ ListNode.java
public class ListNode {
    private Object data;
    private ListNode next;
    public ListNode(Object obj){
        data=obj;
        next=null;
    }
    public ListNode getNext(){
        return next;
    }

    public void setNext(ListNode val){
        next=val;
    }

    public Object getData(){
        return data;
    }

    public void print(){
        System.out.println(data.toString());
    }
}
//