nerdexam
Oracle

1Z0-809 · Question #185

Given the code fragment: Path path1 = Paths.get("/software/././sys/readme.txt"); Path path2 = path1.normalize(); Path path3 = path2.relativize(path1); System.out.print(": " + path1.getNameCount())…

The correct answer is A. 5:3:6. You've hit your session limit · resets 10:20pm (America/New_York)

Question

Given the code fragment: Path path1 = Paths.get("/software/././sys/readme.txt"); Path path2 = path1.normalize(); Path path3 = path2.relativize(path1); System.out.print(": " + path1.getNameCount()); System.out.print(": " + path2.getNameCount()); System.out.print(": " + path3.getNameCount()); What is the result?

Options

  • A5:3:6
  • B6:5:6
  • C3:3:4
  • D4:4:4

How the community answered

(63 responses)
  • A
    78% (49)
  • B
    14% (9)
  • C
    5% (3)
  • D
    3% (2)

Explanation

You've hit your session limit · resets 10:20pm (America/New_York)

Community Discussion

No community discussion yet for this question.

Full 1Z0-809 Practice