I need to read lines in a file word by word and spit it back out with something appended to it. I know I can use Scanner to read lines, but there is not Scanner method to parse strings from the line. Is it possible to Scan lines in a loop then parse the words from the line in another loop? What's the best method to implement this?
Well definitely yes, it is a standard cs exercise; but please give some idea of what the string looks like you want to parse and what splitting chars may be available to split the string on and so on. It is all very straight forward, just provide some more details so that we do not begin guessing and give time-wasting blunders to your effort.
"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
There are multiple words in the file , some on different lines. For instance The only delimiter would be space between each word. How would I find out if i'm at the end of a line and how do i write it into another file exactly like that , but with the ability to append things in between each word if i want.