what is wrong in this program?I have netbeans 7.0 & jdk 7. please do corrections.
import java.io.*;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
import java.io.InputStream;
import java.nio.file.Paths;
import java.nio.channels.FileChannel;
import java.nio.file.StandardCopyOption.*;
import java.io.FileNotFoundException;
public class Test {
public static void main(String[] args) {
File source = new File("C:\\From\\figures.txt");
File target = new File("C:\\To\\figures.txt");
Path p1 = Paths.get("C:\\Temp\\source.txt");
Files.copy(source, target, REPLACE_EXISTING);
}
}
View Answers
Related Tutorials/Questions & Answers:
Advertisements