adplus-dvertising
frame-decoration

Question

How to copy the file from one location to other?

a.

Files.copy(source, target)

b.

Path.copy(source, target)

c.

source.copy(target)

d.

Files.createCopy(target)

Posted under Java Programming

Answer: (a).Files.copy(source, target)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. How to copy the file from one location to other?

Similar Questions

Discover Related MCQs

Q. How can we get the size of specified file?

Q. How to read entire file in one line using java 8?

Q. How can we create a symbolic link to file?

Q. How can we filter lines based on content?

Q. Which jar provides FileUtils which contains methods for file operations?

Q. Which feature of java 7 allows to not explicitly close IO resource?

Q. Which of the following is not a core interface of Hibernate?

Q. SessionFactory is a thread-safe object.

Q. Which of the following methods returns proxy object?

Q. Which of the following methods hits database always?

Q. Which of the following method is used inside session only?

Q. Which of the following is not a state of object in Hibernate?

Q. Which of the following is not an inheritance mapping strategies?

Q. Which of the following is not an advantage of using Hibernate Query Language?

Q. In which file database table configuration is stored?

Q. Which of the following is not an advantage of Hibernate Criteria API?

Q. What should the return type of method where there is no return value?

Q. What data structure should be used when number of elements is fixed?

Q. What causes the program to exit abruptly and hence its usage should be minimalistic?

Q. Which one of the following causes memory leak?