How to rename a file in Java?

Ads
Ads

How to rename a file in Java?


Java Coder
How to rename a file in Java?
1 Answer(s)      a year and a month ago
Posted in : Java Beginners
Ads

Hi,

What is the code for renaming a file?

How to rename a file in Java?

Thanks

View Answers

April 16, 2017 at 9:09 PM


Hi,

You can use the renameTo() method for renaming a file or directory.

Check tutorial at Rename the File or Directory in Java.

Thanks


Ads