int hashval hashfunc(key)/delete dataitem /hash the key while(hasharray[hashval!null/until empty cell/found the keyif(hasharray[hashvalidata =keydataitem temp hasharray[hashval]/save item hasharray[hashvalnonitem/delete item return temp/return item ++hashval/go to next cell hashval %arraysize/wrap around if necessary return null/can' find item /end delete(the hash java program here' the complete hash java program dataitem object contains just one fieldan integer that is its key as in other data structures we've discussedthese objects could contain more dataor reference to an object of another class (such as employee or partnumberthe major field in class hashtable is an array called hasharray other fields are the size of the array and the special nonitem object used for deletions here' the listing for hash java/hash java /demonstrates hash table with linear probing /to run this programc:>java hashtableapp import java io */for / import java util */for stack class import java lang integer/for parseint(///////////////////////////////////////////////////////////////class dataitem /(could have more datapublic int idata/data item (key//public dataitem(int ii/constructor idata ii///end class dataitem ///////////////////////////////////////////////////////////////