Oracle
1Z0-809 · Question #91
1Z0-809 Question #91: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #91. The question stem and answer options stay visible for context.
Question
Given the code fragment:
Path p1 = Paths.get("/Pics/MyPic.jpeg");
System.out.println (p1.getNameCount() +
":" + p1.getName(1) +
":" + p1.getFileName());
Assume that the Pics directory does NOT exist.
What is the result?
Options
- AAn exception is thrown at run time.
- B2:MyPic.jpeg: MyPic.jpeg
- C1:Pics/Pics: MyPic.jpeg
- D2:Pics: MyPic.jpeg
Unlock 1Z0-809 to see the answer
You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 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.