Oracle
1Z0-804 · Question #64
Given: What is the result?
The correct answer is B. index.html. p.getName(int location) = returns path' name element by index/location (starts with 0) Example: path = "project//doc//index.html" p.getName(0) = project p.getName(1) = doc p.getName(2) = index.html
NIO.2
Question
Given:
What is the result?
Exhibit
Options
- Adoc
- Bindex.html
- Can IllegalArgumentException is thrown at runtime.
- DAn InvalidPthException is thrown at runtime.
- ECompilation fails.
How the community answered
(34 responses)- A3% (1)
- B76% (26)
- C6% (2)
- D3% (1)
- E12% (4)
Explanation
p.getName(int location) = returns path' name element by index/location (starts with 0) Example: path = "project//doc//index.html" p.getName(0) = project p.getName(1) = doc p.getName(2) = index.html
Topics
#Path#getFileName#path components
Community Discussion
No community discussion yet for this question.
