• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with search method

 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey yall, I have a quick question on a project I am working on. What would be the best way to fix this problem? I am attempting to search through a circularList array that I just inserted a lower case word, from a text file, and when I try my search, I keep getting a zero returned. This is by design, but the search method is supposed to return the number of int's that it counted before it found the word in the Linked List. The WordCounter class is a typical word counter class which converts words from a file to lowercase or strips non letters from the word from a file. Now, the wordCounter class is working correctly, so I am not to worried about that, but I am worried about my WordStats class which contains this search method.
Here is the search method code.



as you can see, I've tried a few different things to get it to do what it is supposed to do.
incedently, temp is/ was myLast.next, which is my ListNode in my circluarList class.
Thanks in advance.
[ April 03, 2004: Message edited by: Gabriel White ]
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does your getLowerCase method look like?
What does your equals method look like?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic