/demonstrates hash table with separate chaining /to run this programc:>java hashchainapp import java io */for / import java util */for stack class import java lang integer/for parseint(///////////////////////////////////////////////////////////////class link /(could be other itemspublic int idata/data item public link next/next link in list /public link(int it/constructor idatait/public void displaylink(/display this link system out print(idata ")/end class link ///////////////////////////////////////////////////////////////class sortedlist private link first/ref to first list item /public void sortedlist(/constructor first null/public void insert(link thelink/insert linkin order int key thelink idatalink previous null/start at first link current first/until end of listwhile(current !null &key current idata/or current keyprevious currentcurrent current next/go to next item if(previous==null/if beginning of listfirst thelink/first --new link else /not at beginningprevious next thelink/prev --new link thelink next current/new link --current /end insert(