About Question enthuware.ocpjp.v7.2.1524 :

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

Moderator: admin

Post Reply
The_Nick
Posts: 132
Joined: Thu May 16, 2013 9:23 am
Contact:

About Question enthuware.ocpjp.v7.2.1524 :

Post by The_Nick »

Hi everybody,
I see that in Files.move the NOFOLLOW_LINKS option is implicit. There is no need to specify it when moving a link right?

The_Nick

EpicWestern
Posts: 17
Joined: Wed Jan 22, 2014 12:35 pm
Contact:

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

Post by EpicWestern »

The explanation has Files.move(p1,p2) being wrong because it will throw a java.noi.file.FileAlreadyExistsException

However Files.move(p1,p2) is not a valid method.

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

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

Post by admin »

There is : http://docs.oracle.com/javase/7/docs/ap ... .html#move(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...)

The last argument can be omitted so the given option and the explanation are valid.
If you like our products and services, please help us by posting your review here.

k.vaidas@gmail.com
Posts: 2
Joined: Sun Sep 08, 2019 11:49 pm
Contact:

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

Post by k.vaidas@gmail.com »

Also options with try-with-resources are incorrect not only because Path doesn't implement AutoCloseable. Even if it did, syntax is incorrect, you would get "Declaration, final or effectively final variable expected", because variable is neccessary.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 29 guests