// This class contains the example from lecture. // Drag the "dummy" variable out to view p and q. public class ListTest { public static void main(String[] args) { // This node is just so we get a nice view in // the debugger of p and q ListNode dummy = new ListNode(); ListNode p = new ListNode(1, new ListNode(2)); ListNode q = new ListNode(3, new ListNode(4)); // code we wrote to change before to after p.next.next = q; q = q.next; p.next.next.next = null; } }