Files.copy(currentFile, outputFile) created new.txt file
Files.copy(outputFile, directory) throws java.nio.file.FileAlreadyExistsException because of existing of the /scratch/ folder
Path directory = Paths.get(pathInit+"/scratch/");
try to create a file with the name scratchh but this exist and is a folder so cannot create and throwN already,..
I've tried it out and B is correct. If the second statement were absent. The delete would also throw an Exception because the directory is not empty. Correct me if I'm wrong
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
cathDev
3 months, 1 week agoASPushkin
4 months agod7bb0b2
6 months, 1 week agoOmnisumem
9 months ago[Removed]
10 months, 3 weeks ago