Possible Duplicate:
How to create a Java String from the contents of a file
How to set a java string variable equal to “htp://website htp://website ”
I am making aprogram because I have about 50 pages of a word document that is filled with both emails and other text. I want to filter out just the emails. I wrote the program to do this which was very simple, not I just need to figure away to store the pages in a string variable.
I have a text file imported into my code File f=new File("test.txt");
Now I just need to find a way to save the text in this file into a String variable. Any help?