java - Searching a linklist -


hello have project have read in file of voters name, age , party. list 100 names in length. search through file counting party's , returning winning party. ideas.this have far.

  public searchlist search(string party){         searchlist link = firstlink;          if(!isempty()){             while(link.party != party){          for(int = 0; i<party.length(); i++)         {             if (party.equals(party.get(i).getparty()))             return party.get(i).tostring();         }         return null;     }               }          return null;     } 


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -