How can you list all files and subdirectories in a directory in Java?
You can use `Files.walk()` from the `java.nio.file` package to recursively list all files and directories.
That's correct for the NIO API. `Files.walk()` is an excellent choice for recursive directory listing.
Can you explain the difference between `Files.walk()` and `Files.list()`?