Use a StringTokenizer(). It's default pattern is the space character, so it reads in only the words. You can loop through in a while loop.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
Oh, so this is a console game.... In that case I would get the length of the current letter, print out that number of "_" and whenever a user types in a letter, you compare it (Strings, use indexOf() to get the position) to the real word. Find the position of the letter, and print out the "_" except have a letter in the correct position of the "_".
Sorry if that sounds confusing.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20