copy a file to another java code example
Example: Java copy file
var source = new File("src/resources/bugs.txt");
var dest = new File("src/resources/bugs2.txt");
Files.copy(source.toPath(), dest.toPath(),
StandardCopyOption.REPLACE_EXISTING);