This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Hello everyone, its my first time here. Nice to meet everyone. This is the question;
Write a program Find that searches all files specified on the command line and prints out all lines containing a reserved word. Start a new thread for each file. So by just reading each file individually and using each one in a different thread so they could all be read at once basically?
casey provost wrote:...
So I am unsure how to begin with this code, do I basically search through a file?
Yes. You read each file (in a separate thread, as indicated by your assignment) line per line.
Every time you find the reserved word in a line, you print that line.
Keep on reading untill you reach the end of the file.