class ListNodeDemo { public static void main(String[] args) { ListNode head = new ListNode(); head.setData("Park Lee"); ListNode temp = new ListNode("Joe Smith", head); head = temp; temp = temp.getLink(); ListNode rear = new ListNode("Tracy Meet", null); temp.setLink(rear); // out the head? System.out.println(head.getData()); // out the middle one? System.out.println(temp.getData()); // out the rear one? System.out.println(temp.getLink().getData()); } }