title: Calling a method to add lines to a text file in java
body: <p>I want to be able to call a method like this </p>
  
  <pre><code>public void Printer(String ToPrint)throws IOExcpetion{
  BufferedWriterName.write(ToPrint);
  }
  </code></pre>
  
  <p>That would just add a text line to an already created file.
  But this code needs to be in the same method</p>
  
  <pre><code>FileWriter Write=new FileWriter("c:\\filename.txt");
  BufferedWriter BufferedWriterName =new BufferedWriter(Write);
  </code></pre>
  
  <p>I am worried that it will create a new file each time the method is called if the above code is present. Is there any method that when called will only print a new line to the .txt file?
  I'm a real beginner in this field. I've never created text files from java before, so a completely different approach would be fine.</p>