How to rename a file in Java?

 
 

Share on Google+Share on Google+

Java Coder
How to rename a file in Java?
1 Answer(s)      8 months ago
Posted in : Java Beginners
Ads

Hi,

What is the code for renaming a file?

How to rename a file in Java?

Thanks

Ads
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









Ads

 
Advertisement null

Ads