File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes A recursive method or otherwise Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "A recursive method or otherwise" Watch "A recursive method or otherwise" New topic
Author

A recursive method or otherwise

jite eghagha
Ranch Hand

Joined: Oct 06, 2006
Posts: 127
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

Joined: Jul 08, 2003
Posts: 24187
    
  34

Do you have a question?


[Jess in Action][AskingGoodQuestions]
jite eghagha
Ranch Hand

Joined: Oct 06, 2006
Posts: 127
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

Joined: Apr 14, 2004
Posts: 10336


Will this code recursively weed out the unwanted text?

What happened when you ran it?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
jite eghagha
Ranch Hand

Joined: Oct 06, 2006
Posts: 127
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 ]
 
Consider Paul's rocket mass heater.
 
subject: A recursive method or otherwise