Page 1 of 1

About Question enthuware.ocpjp.v7.2.1610 :

Posted: Mon May 19, 2014 1:36 am
by kashyapa
Path p1 = Paths.get("c:\\company\\records\\customers.dat");
Path p2 = p1.resolveSibling("\\clients.dat")
This will set p2 to c:\clients.dat, which is not what you want.
How this happens?

There’s no vast different with;
Path p2 = p1.resolveSibling("clients.dat");
but it provides;
c:\\company\\records\\client.dat

Re: About Question enthuware.ocpjp.v7.2.1610 :

Posted: Mon May 19, 2014 10:24 am
by admin
I am not sure what you mean by "no vast difference". \\clients.dat starts with \, which is the root component, while clients.dat is relative path. This is a vast difference.
-Paul.

Re: About Question enthuware.ocpjp.v7.2.1610 :

Posted: Thu May 22, 2014 4:32 am
by kashyapa
thanks i got it.

Re: About Question enthuware.ocpjp.v7.2.1610 :

Posted: Tue Jul 21, 2015 5:12 am
by colmkav
resolveSibling doesnt seem to be anywhere in the course material I have read in preparation. Is this on the syllabus? Seem to be quite a few things appear in these questions that don't appear in the course material.

Re: About Question enthuware.ocpjp.v7.2.1610 :

Posted: Tue Jul 21, 2015 7:12 am
by admin
Replied to your same question here
viewtopic.php?f=2&t=3311