Home Answers Viewqa Java-Beginners what is wrong in this program?I have netbeans 7.0 & jdk 7. please do corrections.

 
 


raja hinke
what is wrong in this program?I have netbeans 7.0 & jdk 7. please do corrections.
0 Answer(s)      2 years and a month ago
Posted in : Java Beginners

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 Pages:
jdk

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.