jackin
2013-12-10 19:36:58 UTC
{
if(isEmpty())
{
System.out.println("List is empty! CANNOT FIND!");
}
else
{
for(int c=numOfNodes; c >0; c--)
{
if(key == current.getKey())
{
System.out.println("Found node with key " + current);
break;
}
else
{
step(); //Method to step up current
}
}
}//End of else-clause
if(key!=current.getKey())
{
System.out.println("Can't find node with key " + key);
}
else
{
return current;
}
}//End of find method