// add "Bush" as the head node // class ListNodeDemo1 { 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); // add a new head head = new ListNode("Bush", head); // out the head? System.out.println(head.getData()); // out the middle one? System.out.println(head.getLink().getData()); // out the middle one? System.out.println(head.getLink().getLink().getData()); // next one System.out.println(head.getLink().getLink().getLink().getData()); } }