Home » JAVA Programming » Files and I/O » Question
  1. How to copy the file from one location to other?
    1. Path.copy(source, target)
    2. Files.createCopy(target)
    3. Files.copy(source, target)
    4. source.copy(target)
    5. 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.



Your comments will be displayed only after manual approval.