linked list - How can i make this java node searchandadd method work by passing object? -


here code:

public void searchandadd(object tofind,object toadd) {     node prev=null;     node curr=head;     node newnode=new node(toadd);     curr=new node;     while(curr!=null&&newvalue>curr.item)     {         prev=curr;         curr=curr.next;     } } 

how can make method work in java? , in advance :)


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -