title: PrintWriter append method not appending
body: <p>The following method only writes out the latest item I have added, it does not append to previous entries. What am I doing wrong?</p>
  
  <pre><code>public void addNew() {
      try {
          PrintWriter pw = new PrintWriter(new File("persons.txt"));
          int id = Integer.parseInt(jTextField.getText());
          String name = jTextField1.getText();
          String surname = jTextField2.getText();
          Person p = new Person(id,name,surname);
          pw.append(p.toString());
          pw.append("sdf");
          pw.close();
      } catch (FileNotFoundException e) {...}
  }
  </code></pre>