nerdexam
Oracle

1Z0-804 · Question #56

1Z0-804 Question #56: Real Exam Question with Answer & Explanation

The correct answer is A. false. The relativize method that can be used to construct a relative path between two paths. Path relativize(Path other) Constructs a relative path between this path and a given path. other - the path to relativize against this path the resulting relative path, or an empty path if both

Question

Given: What is the result?

Exhibit

1Z0-804 question #56 exhibit

Options

  • Afalse
  • Bfalse
  • Ctrue
  • Dtrue

Explanation

The relativize method that can be used to construct a relative path between two paths. Path relativize(Path other) Constructs a relative path between this path and a given path. other - the path to relativize against this path the resulting relative path, or an empty path if both paths are equal Relativization is the inverse of resolution. This method attempts to construct a relative path that when resolvedagainst this path, yields a path that locates the same file as the given path. For18example, on UNIX, if this path is "/a/b" and the given path is "/a/b/c/d" then the resulting relative path would be"c/d". Where this path and the given path do not have a root component, then a relative path can beconstructed. A relative path cannot be constructed if only one of the paths have a root component. Where bothpaths have a root component then it is implementation dependent if a relative path can be constructed. If thispath and the given path are equal then an empty path is returned. For any two normalized paths p and q, where q does not have a root component,p.relativize(p.resolve(q)).equals(q) When symbolic links are supported, then whether the resulting path, when resolved against this path, yields apath that can be used to locate the same file as other is implementation dependent. For example, if this path is"/a/b" and the given path is "/a/x" then the resulting relative path may be "../x". If "b" is a symbolic link then isimplementation dependent if "a/b/../x" would locate the same file as "/a/x".

Community Discussion

No community discussion yet for this question.

Full 1Z0-804 Practice