Possible Duplicate:
How to create a Java String from the contents of a file
I have a .txt file that I want to save in a String variable. I imported the file with File f = new File("test.txt");
. Now I am trying to put the contents of it in a String
variable. I can not find a clear explanation for how to do this.