You need a return in the third if statement, otherwise the result from the recursive call to doSearch
is never propagated back up the call stack.
 
 
  public String doSearch(ListNode node,String airportCode) {
   
    if(node == null) {                          // if the node is null then
                                                  // the list must be empty
      return("List is Empty\n");
    } // end if
 
    if (node.airport.equals(airportCode) == true) {                                                                                      
          System.out.println("They are equal"); // debug
          System.out.println(node.airport);       // debug
          return("Found: " + node.airport);
    } // end if
   
    if (node.link != null) {              // if the node's link isn't null then
                                          // this isn't the last node so search     
===>      return doSearch(node.link, airportCode);       // again with the link as the first node
    } // end if 
                                                                                                                                  // if it hasn't met the first 3 requirments
    return ("Could not find: " + airportCode);      // then the value isn't in the list.
  } // end doSearch     
 
----- Original Message -----
From: eb
Sent: Monday, May 14, 2001 8:29 PM
Subject: Re: [JAVA3D] A regular Java problem

I thought I sent the files in the last e-mail.. lets try this again. Can I not send multiple files through this server?

Reply via email to