• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A recursive method or otherwise

 
jite eghagha
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
Every memo, or document, has words that are a waste of space, i need to store usefull words and their projectNumbers. (the code will explain)


I'll include chunks of code to help, but the general idea is to compare each token to every line read from a file;


[ October 09, 2006: Message edited by: jite eghagha ]

[ October 09, 2006: Message edited by: jite eghagha ]

[Edited to include code tags - Paul Sturrock]

[ October 10, 2006: Message edited by: Paul Sturrock ]
[ October 10, 2006: Message edited by: jite eghagha ]
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a question?
 
jite eghagha
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much, here's the question. Will this code recursively weed out the unwanted text? If no, can any one please correct it so that it does.


[Edited to use code tags - Paul Sturrock]

[ October 10, 2006: Message edited by: jite eghagha ]
[ October 10, 2006: Message edited by: Paul Sturrock ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Will this code recursively weed out the unwanted text?

What happened when you ran it?
 
jite eghagha
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hhmmmm.

to run and test i iterated through List "KeyWords" and promted each object on the list for its projectNumber;

System.out.println(KW.getprojectNumber())

i got 418 project numbers; but they were all the same.

Plus, my recursion must be way of because changing this line:

while (i < bpo.length)
compareToTextFile();

to this line:

while (i < 1)
compareToTextFile();

still gives me 418 projectNumbers

[ October 10, 2006: Message edited by: jite eghagha ]
[ October 10, 2006: Message edited by: jite eghagha ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic