// Hunter Schafer, CSE 143 // Represents a list of integers. public class LinkedIntList { private ListNode front; // post: Adds the given value to the end of this 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); } } // post: Prints the list contents, one element per line public void printList() { ListNode current = front; while (current != null) { System.out.println(current.data); current = current.next; } } }