Working with Files in Java
I have been working with java for my latest assignment and I ran into some problems while working with files. I need to access a file, word by word but I also want to know when I moved from one line in the file to the next. I don't want to store the entire line in a String and then access it word by word since the amount of data on a single line may be large. Is there a way for me to access the file word by word and still be able to know when a new Line has occurred?
I am currently using scanner and the delimiter by default looks for white spaces so I am getting the content word by word, but when it finishes reading a line, it just jumps to the next one.