Which interface name inserted into the blank below allows the code snippet to compile?
Path file = Paths.get("/data/movie.txt");
BasicFileAttributes b = Files.readAttributes(file, ___);
D.
DosFileAttributes and PosixFileAttributes extend BasicFileAttributes.
They are compatible with the readAttributes()
method signature.
They produce instances that inherit the interface BasicFileAttributes.
Yhey
can be assigned to a variable b of type BasicFileAttributes without an explicit cast.
All three interfaces are permitted, and Option D is the correct answer.