How do i write to a text file WITHOUT deleting the current information in it? basically write on the next available line.

That sounds like you want to APPEND to the end of the current file.
Read the API doc for the file output classes. One of the constructors takes a boolean specifying whether to append or not.

try {
    BufferedWriter out = new BufferedWriter(new FileWriter("example.txt", true));
    out.write("aString");
    out.close();
} catch (IOException e) {
}

Just make sure "true" is the 2nd argument, it says to append or not.

Hope this helps!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.