Move File in Java

If you want to move a file from one directory to anther in Java, you can use rename() method of File. The following is a simple code example for moving a file called “s1” to another directory. package com.programcreek;   import java.io.File;   public class MoveFileExample {   public static void main(String[] args) { File … Read more