Loading…
Loading…
Ten exam-style questions on NIO.2 file operations: Files.copy for files, directories and streams, REPLACE_EXISTING, copying into directories, move and ATOMIC_MOVE, delete versus deleteIfExists, isSameFile and mismatch, with explanations.
Practice questions for the article Java Files: Copying, Moving, Deleting and Comparing Files.
Each file-system result was checked by running the code against real files in a temporary folder. Aim for at least 8 out of 10.
Quiz path: step 99. Take the quizzes in this order, after reading each article.
Previous quiz: Path Methods: normalize, resolve and relativize (OCP 21)
Next quiz: I/O Stream Fundamentals (OCP 21)
10 questions · pass at 68%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.