Output to .txt file
I've been trying to output a String to a file and this is basically what I have so far:
PrintWriter fnameFile=null;
String fname="John Doe";
try{
fnameFile=new PrintWriter(new FileWriter(new File("fname.txt")));
}//try
catch(Exception e){
System.out.println("ERROR");
}//catch
fnameFile.println(fname);
Any help would be greatly appreciated.
Message was edited by:
Marshall_Lewis
null

