title: “\n” not adding new line when saving the string to text using BufferWriter to text file
body: <p>Hi everyone I am trying to add a new line of string into an existing file, however the code i have appends it to the last string instead. I fixed it by adding a new line character to the string appending to the file, is there another way to append a string on a new line at the end of a file without adding the new line character to the beginning of the string? </p>
  
  <pre><code>String name = "\nbob";
  BufferedWriter out = new BufferedWriter(new FileWriter("names.txt",true));
      out.write(name);
      out.close();
  </code></pre>
  
  <p>current file:</p>
  
  <pre><code>bill
  joe
  john
  </code></pre>
  
  <p>after append</p>
  
  <pre><code>bill
  joe
  john
  bob
  </code></pre>
  
  <p>append without newline</p>
  
  <pre><code>bill
  joe
  johnbob
  </code></pre>