// Allison Obourn // CSE 143 - Lecture 8 // Demonstrates using ListNode objects to build chains of values. // Creates a LinkedIntList and calls its methods. public class ListClient { public static void main(String[] args) { ListNode node = new ListNode(3, new ListNode(42, new ListNode(14))); ListNode current = node; while(current != null) { System.out.println(current.data); current = current.next; } LinkedIntList list = new LinkedIntList(); list.add(3); list.add(42); System.out.println(list); } }