the second statement is all you need to remove the first link from the list we choose to also return the linkfor the convenience of the user of the linked listso we save it in temp before deleting itand return the value of temp figure shows how first is rerouted to delete the object in +and similar languagesyou would need to worry about deleting the link itself after it was disconnected from the list it' in memory somewherebut now nothing refers to it what will become of itin javathe garbage collection process will destroy it at some point in the futureit' not your responsibility figure deleting link notice that the deletefirst(method assumes the list is not empty before calling ityour program should verify this with the isempty(method the displaylist(method to display the listyou start at first and follow the chain of references from link to link variable current points to (or technically refers toeach link in turn it starts off pointing to firstwhich holds reference to the first link the statement current current next