-
How to copy the file from one location to other?
-
- Path.copy(source, target)
- Files.createCopy(target)
- Files.copy(source, target)
- source.copy(target)
- None of these
Correct Option: C
Files.copy(source, target) is used to copy a file from one location to another. There are various options available like REPLACE_EXISTING, COPY_ATTRIBUTES and NOFOLLOW_LINKS.