Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

appending string to a file

Status
Not open for further replies.

mgl70

Programmer
Sep 10, 2003
105
US
hi

I am new to this java. I have a question. How to append or merge a string(Ii is a long string with delimeters) to a file.

if anybody know this please help me.

Thanks in advance.
 
Code:
String yourString = "something";

// second boolean argument to true meant 'append'
FileWriter writer = new FileWriter(test.txt, true);
writer.write(yourString);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top