There is 2 variants of file moving:
1. Using renameTo
2. Or just copy and delete

#1

try{

File justfile=new File("C:\\firstFolder\\justfile.txt");

if(justfile.renameTo(new File("C:\\secondFolder\\" + justfile.getName()))){
System.out.println("Successful!");
}else{
System.out.println("Failed!");
}

}catch(Exception e){
e.printStackTrace();
}

#2

InputStream inputStream = null;
OutputStream outputStream = null;

try{

File firstFile =new File("C:\\firstFolde\\file.txt");
File secondFile =new File("C:\\secondFolder\\file.txt");

inputStream = new FileInputStream(firstFile);
outputStream = new FileOutputStream(secondFile);

byte[] buffer = new byte[1024];

int leng;

while ((leng = inputStream.read(buffer)) > 0){
outputStream.write(buffer, 0, leng);
}

inputStream.close();
outputStream.close();

firstFile.delete();

System.out.println("Successful!");

}catch(IOException e){
e.printStackTrace();
}