title: Move files in java?
body: <p>I am trying to move a file from the directory <code>workspce/TextInput</code> to <code>workspace/CPUInput</code> using this code: </p>
  
  <pre><code>String Direct = System.getProperty("user.dir");
  
      File f1 = new File(Direct + "/FirstChar.txt");
  
      f1.renameTo("../CPUInput");
  </code></pre>
  
  <p>but on <code>f1.renameTo("../CPUInput");</code> it give my a compiler error <code>The method renameTo(File) in the type File is not applicable for the arguments (String)</code></p>
  
  <p>If I can't use strings arguments for <code>renameTo()</code>, then what arguments do I pass to the method?</p>