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
Post a Comment