right now, im trying to edit the text file. however, all it does is overwrite over the original file. I want the string i add to be added to the original file. Is there someway i can do this?
For example, the original text says "hi". I want to add "how are you to it", so it would say "hi. how are you."
Code

similar to before)
import java.io.*;
public class FileAccess {
public void displayFile(String f) throws IOException {
FileReader fr = new FileReader(f);
BufferedReader br = new BufferedReader(fr);
f = br.readLine();
while (f != null) {
System.out.println(f);
f = br.readLine();
}
br.close();
fr.close();
}
public void writeToFile(String outfile, String s) throws IOException {
FileOutputStream fs = new FileOutputStream(outfile);
PrintStream p = new PrintStream(fs);
p.println(s);
p.close();
fs.close();
}
}
thanks again.
ps. srry for all these questions