You can use String methods to break up the string into words.
You can use a StringTokenizer to break it into tokens; this is an older way.
You can use the
split method to break up the string into an array of words. The challenge here is to use the correct Pattern. This is the newer way. See the Pattern class for options.
Maybe something like this:
String str = stringFromReadingInTheFile.
String[] words = str.split("\\b(\\s+)\\b");