Reading words in a phrase without Tokenizer

Hi guys I'm looking for somehelp to select words from a text file and then compare the size of each word(vector class I guess) But the key issue is that I cannot!!! use a StringTokenize. I've managed to put the file (now a String) into an array count the number of spaces (as case) and vowels but to pick out each word what should I do. I previously worked out how to pick out the first and last words in a short phrase using a while loop of while(loopIndex >=0&&line.charAt(loopIndex) !=' '). What can I change to pick out each word in turn??? Yours Greg

Greg this sounds like a homework assignment so I'll give you a push in the right direction... I assume your defining a word as anything surrounded by whitespace? your steps would be this: read in a line into a String while you haven't reached the end of the String find the index of the next whitespace everything between that index and the previous one is a word do what ever you need to do with the word done looping you need a couple,of index variables to keep track of the current and previous index of whitespace characters. Some of the String methods to look at are: indexOf() length() substring() hope that helps