Oracle
1Z0-819 · Question #139
1Z0-819 Question #139: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-819 to reveal the answer and full explanation for question #139. The question stem and answer options stay visible for context.
Question
Given:
Path p = Path.of("mango"); // line 1
Path p1 = p.resolve("guava"); // line 2
Path p2 = p.resolve("guava"); // line 3
Path p3 = p2.resolve("../", "apple"); // line 4
System.out.println(p1 + " " + p3);
What is the result of compiling and running this code?
Options
- ACompiler error
- Bmango/guava mango/apple
- Cmango/java apple
- Dmango/guava
- ENone of these
Unlock 1Z0-819 to see the answer
You've previewed enough free 1Z0-819 questions. Unlock 1Z0-819 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.