hey guys.. can you help me explain this code?
public Boolean insertAfter (double key, double dd)
{
Link current = first1
while (current.dData != key)
{
current = current.next;
if (current == null)
Return false;
}
Link newLink = new Link(dd);
if (current == last)
{
newLink.next = null;
last = newLink;
}
else
{
newLink.next = current.next;
current.next.previous = newLink;
}
newLink.previous = current;
current.next = newLink;
return true;
}
thanks!!