Hello out there...

Below is a simple code that appends a string at the end of a file. My question is how do you append a string on the next line. For example, let's say my test.txt file had:
////////////////
Hello
World
Java

///////////////
Assume I want to append "JELLO". The source code below will append JELLO right after Java: JavaJELLO.
What I want is to have:
Java
JELLO

Thanks guys.

import java.io.*;
class TextWriter {

public static void main(String[] args) {
String textToAppend = "JELLO";
File file = new File("test.txt");
try {
Writer writer = new BufferedWriter(new FileWriter(file, true));
writer.write(textToAppend, 0, textToAppend.length());
writer.close();
} catch (IOException e) {
}
}
}