public boolean renameTo(File dest)
Renames the file indicated by this abstract path.
Many aspects of the behavior of this method inherently depend on the platform : the renaming operation cannot move the file from one file system to another, and this may not work if the file with the destination abstract path already exists.
A source
But the move method can move or rename a file using a platform independent tool .
renameTo just returns a boolean type , but move returns the path to the target file
Chandra sekhar
source share