Rename File Java

Rename File Java

In this sample java class you will see how to rename existing java file. To rename existing you will have to create File instance with old file and rename it as shown below:

 

Output:

Rename File Java

For more information on File please refer oracle documentation here

Leave a Reply

Your email address will not be published. Required fields are marked *