Chapter 9Using Java I/O API
- What exception is expected to be thrown by the following code snippet?
var oldPath = Path.get("/rodent/mouse.txt");
var newPath = Path.get("/rodent/rat.txt");
Files.move(oldPath, newPath,
StandardCopyOption.REPLACE_EXISTING);
AtomicMoveNotSupportedException
DirectoryNotEmptyException
FileAlreadyExistsException
- The code does not compile.
- None of the above.
- What is the result of compiling and executing the following program? ...
Get OCP Oracle Certified Professional Java SE 17 Developer Practice Tests now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.