package linkedLists; /**Node of a singly linked list of integers*/ public class IntNode { private int element; private IntNode next; /**default constructor*/ public IntNode(){ this(0,null); } /** Creates a node with the given element * and next node */ public IntNode(int i, IntNode n){ element=i; next=n; } /**Returns the element of this node */ public int getElement(){return element;} /**Returns the next node of this node. */ public IntNode getNext(){return next;} //Modifier methods /**Sets the element of this node */ public void setElement(Integer i){element=i;} /**Sets the next field of this node. */ public void setNext(IntNode n){next = n;} }