class ListEl { Object obj; ListEl next; public ListEl(Object o) { obj = o; next = null; } } public class MyList{ public static void main( String [] args) { ListEl start, newEl, temp; newEl = new ListEl(new Integer(7)); start = newEl; // Inserting another element at the beginning of the list newEl = new ListEl(new Integer(11)); newEl.next = start; start = newEl; // Inserting another element newEl = new ListEl(new Integer(13)); newEl.next = start; start =newEl; Auxiliaries.printList(start); temp = start.next; // Deleting temp from the list start.next = temp.next; temp.next = null; Auxiliaries.printList(start); } } class Auxiliaries { public static void printList(ListEl s) { while (s != null) { System.out.println( s.obj); s = s.next; } } }