Can we rename a file say test.txt to test1.txt ?
test.txt
test1.txt
If test1.txt exists will it rename ?
How do I rename it to the alrea
As far as I know, renaming a file will not append its contents to that of an existing file with the target name.
About renaming a file in Java, see the documentation for the renameTo() method in class File.
renameTo()
File