/**** * * Class ListNode defines an integer-value element of a singly-liked list. * */ public class ListNode { /** Integer data value of the node. */ int value; /** Pointer to next node in the list. */ ListNode next; /** * Allocate a new node with the given integer value and null next field. */ ListNode(int value) { this.value = value; next = null; } }