nerdexam
Oracle

1Z0-804 · Question #65

Given the code fragment: What is the result?

The correct answer is C. getName(0): education. Path path = Paths.get("C:\\home\\joe\\foo");

NIO.2

Question

Given the code fragment:

What is the result?

Exhibit

1Z0-804 question #65 exhibit

Options

  • AgetName (0): C:\
  • BgetName(0): C:\
  • CgetName(0): education
  • DgetName(0): education
  • EgetName(0): report.txt

How the community answered

(22 responses)
  • A
    5% (1)
  • B
    9% (2)
  • C
    77% (17)
  • E
    9% (2)

Explanation

Path path = Paths.get("C:\home\joe\foo");

Topics

#Path.getName#path index#path components

Community Discussion

No community discussion yet for this question.

Full 1Z0-804 Practice