title: How to rename a file without making another file (Java)
body: <p>I am looking for a away to rename a file to a string. renameTo only takes another file as a parameter, but I want it to take a string. So basically, how do I implement this method here?</p>
  
  <pre><code>public static void renameFile(File toBeRenamed, String new_name) {
  
  }
  </code></pre>
  
  <p>I would like to rename the file "toBeRenamed" to "new_name". Do I have to make another file called new_name, or is there some workaround? Thanks!</p>
  
  <p>EDIT: Thanks for the answer Luiggi. Here is a pic of the new error: </p>
  
  <p><img src="https://i.stack.imgur.com/SJeww.png" alt="enter image description here"></p>