View Single Post
Old Feb 24th, 2005, 1:05 AM   #2
ZenMasterJG
Hobbyist Programmer
 
ZenMasterJG's Avatar
 
Join Date: Nov 2004
Location: Boston, MA
Posts: 148
Rep Power: 5 ZenMasterJG is on a distinguished road
Send a message via AIM to ZenMasterJG
in your findclient method, try somthing like this:
public void findclient(String details)
{
   for(int x=0; x<arraySize; x++) {
      //I donno how your Client class is defined, but you'll need a method that 
      //returns the name
      if( (collection[x].getName()).equalsIgnoreCase(details)) {
           //Found it! do whatever you want here.
      }
   }
}

if you want that method to return some data found in there, i'd make sure you search the whole array and put the found entries on a new array, and return THAT, as names have a nasty habit of being non-unique, and just returning the first one you find could leave out a lot of data.

Last edited by ZenMasterJG; Feb 24th, 2005 at 1:05 AM. Reason: oops, missed a brace.
ZenMasterJG is offline   Reply With Quote