Wpis z mikrobloga

import java.io.IOException;
import java.nio.file.*;

public class Kopiowanie {
public static void main(String[] args) throws IOException {
Files.copy(Paths.get("E:/atom/in.txt)",Paths.get("E:/atom/nowy/in3.txt"), StandardCopyOption.REPLACEEXISTING));
}
}
Co w tym źle? Z kompilatora:
Kopiowanie.java:6: error: method get in class Paths cannot be applied to given types;
Files.copy(Paths.get("E:/atom/in.txt)",Paths.get("E:/atom/nowy/in3.txt"), StandardCopyOption.REPLACE
EXISTING));
^
required: String,String[]
found: String,Path,StandardCopyOption
reason: varargs mismatch; Path cannot be converted to String
#naukaprogramowania #java
  • 4