Quote:
Originally Posted by ForbiddenX
Do you have any progress done or specific questions? I can try and help. Probably won't be learning too much if you're just given the answers though :P
|
only got the part to read the input for file
Quote:
Originally Posted by c_loke
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(" ");
|
perfect! ill try to write it. Any of you are expects with java?