Sunday, August 2, 2009

Can you give me a Java console that find a specific word in sentence each line from file?

For example: I need to find a "Wednesday" word in each sentence by line by line.





Go ballet class next Wednesday.


On the Wednesday is going to swim class.





Then it will show the output:


Wednesday : ballet class


Wednesday : swim class





I am going to figure out in Java console to read from a file. I know already to make input/file codes.

Can you give me a Java console that find a specific word in sentence each line from file?
WHILE THE FILE IS NOT EMPTY


read a line from the file


use the correct string function to find "Wednesday" in the line


if found run the function to find the name of the class


No comments:

Post a Comment