Re: About Question enthuware.ocpjp.v11.2.3335 :
Posted: Fri Jun 09, 2023 10:54 am
Hello, one doubt..
In the code:
Path p1 = Paths.get("c:\\temp\\src\\foo.bar\\module-info.java");
Path p2 = Paths.get("c:\\temp\\out\\foo.bar"); //foo.bar is a folder
Files.move(p1, p2, REPLACE_EXISTING );
Question 01: The file "module-info.java" would be copied "overwriting" on top "foo.bar", even IF the foo.bar folder was "not-empty"?
Question 02: The file "module-info.java" would be copied "overwriting" on top "foo.bar", even IF the foo.bar folder was "empty"?
Thanks
In the code:
Path p1 = Paths.get("c:\\temp\\src\\foo.bar\\module-info.java");
Path p2 = Paths.get("c:\\temp\\out\\foo.bar"); //foo.bar is a folder
Files.move(p1, p2, REPLACE_EXISTING );
Question 01: The file "module-info.java" would be copied "overwriting" on top "foo.bar", even IF the foo.bar folder was "not-empty"?
Question 02: The file "module-info.java" would be copied "overwriting" on top "foo.bar", even IF the foo.bar folder was "empty"?
Thanks