nerdexam
Oracle

1Z0-805 · Question #16

1Z0-805 Question #16: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-805 to reveal the answer and full explanation for question #16. The question stem and answer options stay visible for context.

Question

Given the code fragment: 11. public static getFileSize () throws IOException { 12. path file = paths.get ("ex.txt"); 13. //insert code here 14. System.out.println ("size: " + attr.size()); 15. } public static getFileSize () throws IOException { Path file = Paths.get ("ex.txt"); //insert code here Line ** System.out.println ("size: " + attr.size()); } Which two fragments, when inserted independently at line **, enable printing of the file size?

Options

  • ABasicFileAttributes attr = Files.readAttributes (file, BasicFileAttributes.class);
  • BPosixFileAttributes attr = Files.readAttributes (file, posixFileAttributes.class);
  • CDosFileAttributes attr = Files.readAttributes (file, dosAttributes.class);
  • DFileStore attr = Files.getFileStore (file);
  • EAclFileAttributeview attr = Files.getFileAttributeView(File, AclFileAttributeview.class);

Unlock 1Z0-805 to see the answer

You've previewed enough free 1Z0-805 questions. Unlock 1Z0-805 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1Z0-805 Practice
Given the code fragment: 11. public static getFileSize () throws... | 1Z0-805 Q#16 Answer | NerdExam