View Single Post
Old 11-12-2013, 12:39 PM   #3
c_loke
My dinner reheated before my turbo spooled
 
c_loke's Avatar
 
Join Date: Aug 2002
Location: Richmond
Posts: 1,706
Thanked 10 Times in 7 Posts
Failed 0 Times in 0 Posts
Try breaking the problem down a bit. I'll take #2 for example.

You know that you have to get the works into a string array but to do this you first need to get the string of words. The string of words will need to come from somewhere, and in your case, it will come from a file. You then need to figure out how to read a text file to string.

How to create a Java String from the contents of a file? - Stack Overflow

First google search btw.

After you read in the file, you need to determine how you are going to split the words. Well you might want to split on the sentences, so you might have something that says

String [] words = stringofwords.split(" ");
c_loke is offline   Reply With Quote