Hi,
Try this:
FileWriter writer = new FileWriter("file.txt");
writer.write("Some text to append...");
writer.close();
If a file contains "This is text.", and if you execute this code, then your text file will contain this:
This is text.Some text to append...
If you want a new line after "This is text", then use the escape sequence for a new line:
FileWriter writer = new FileWriter("file.txt");
writer.write("\nSome text to append...");
writer.close();
In that case, your text file will contain this:
This is text.
Some text to append...
Hope this helps.