Insert in front of the list

Go down

Insert in front of the list

Post  Admin on Fri Aug 26, 2011 11:54 am

public ListNode insertInFront(ListNode list, Object a){
ListNode first=new ListNode(a);
first.next=list;
return first;
}

Admin
Admin

Posts : 131
Join date : 2011-08-16

View user profile http://codefornongeek.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum