title: Rename a file using Java
body: <p>Can we rename a file say <code>test.txt</code> to <code>test1.txt</code> ?</p>
  
  <p>If <code>test1.txt</code> exists will it rename ? </p>
  
  <p>How do I rename it to the already existing test1.txt file so the new contents of test.txt are added to it for later use?</p>