// Simple version of LinkedIntList with the appending add method public class LinkedIntList { private ListNode front; // post: appends the value to the end of the list public void add(int value) { if (front == null) { front = new ListNode(value); } else { ListNode current = front; while (current.next != null) { current = current.next; } current.next = new ListNode(value); } } }