Hi again. I am trying to write a String to a file using : FileWriter frOut = new FileWriter("OUTPUT.TXT"); String t = new String("test"); frOut.write(t); //answer to own question (search is your friend) //** frOut.close(); is needed The file is created but nothing is written. I have built the string within the program and simply wish to store it as a text file. Thanks again, Allen [ January 25, 2002: Message edited by: alleykat ]
Roy Ben Ami
Ranch Hand
Joined: Jan 13, 2002
Posts: 732
posted
0
so u got the answer right? just close it and u will be fine.
Muhammad sibtain
Greenhorn
Joined: Aug 31, 2001
Posts: 17
posted
0
You must have to close the stream to flush all the data to the file what ever you write, it goes to stream either use frOut.flush() or frOut.close() to make data persistant. Regards, Sibtain