• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

A recursive method or otherwise

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have a question?
 
jite eghagha
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Tell me how it all turns out. Here is a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic