About Question enthuware.ocpjp.v7.2.1599 :
Posted: Tue Mar 26, 2013 9:28 am
In explanation an example is provided:
"For example, "/a/c".relativize("a/b") is "../b" because "/a/c/../b" is "/a/b""
But it's incorrect because an IllegalArgumentException will be thrown according to:
"A relative path cannot be constructed if only one of the paths have a root component."
I suppose it should be "/a/c".relativize("/a/b") instead of "/a/c".relativize("a/b")
"For example, "/a/c".relativize("a/b") is "../b" because "/a/c/../b" is "/a/b""
But it's incorrect because an IllegalArgumentException will be thrown according to:
"A relative path cannot be constructed if only one of the paths have a root component."
I suppose it should be "/a/c".relativize("/a/b") instead of "/a/c".relativize("a/b")