About Question enthuware.ocpjp.v8.2.1596 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
oscar_
Posts: 7
Joined: Sat Feb 27, 2016 5:56 am
Contact:

About Question enthuware.ocpjp.v8.2.1596 :

Post by oscar_ »

The explanation example for the last option ( ..\..\index.html ) says that:
“A ".." implies parent folder, therefore imagine that you are taking off one ".." from the right side of the plus sign and removing the last name of the path on the left side of the plus sign.”
So looking at the example:
=> \personal\readme.txt + ..\..\index.html
=> \personal + ..\index.html
Notice how the filename is removed and not part of the the path. Hence the example contradicts the explanation. This is especially misguiding since the filename is irrelevant in order to relativize the path.

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1596 :

Post by admin »

The given explanation is correct. It shows an easy way to resolve the dot dots. The last name of the path on the left side of + os readme.text and that is what cancels out the .. on the right side of +.

BTW, a "path" includes everything in the Path object. Whether the path ends with a file name or a directory name is irrelevant. As far as the path is concerned, each component of the path is a name. readme.txt looks like a file name but it could very well be a directory.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

oscar_
Posts: 7
Joined: Sat Feb 27, 2016 5:56 am
Contact:

Re: About Question enthuware.ocpjp.v8.2.1596 :

Post by oscar_ »

admin wrote:BTW, a "path" includes everything in the Path object. Whether the path ends with a file name or a directory name is irrelevant. As far as the path is concerned, each component of the path is a name. readme.txt looks like a file name but it could very well be a directory.
You are right about that. I really had a hard time grasping that the file name was part of the path and therefore ".." would cancel it out.
admin wrote: HTH,
Paul.
Well you really did.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 10 guests