About Question enthuware.ocpjp.v8.2.1780 :

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

Moderator: admin

Post Reply
lveto15
Posts: 27
Joined: Tue Sep 22, 2015 1:01 pm
Contact:

About Question enthuware.ocpjp.v8.2.1780 :

Post by lveto15 »

I have question to test question construction.

In my opinion the best answer was the last option:
Contents of test.txt will be copied at the end of test2.txt exactly as ther are only if test2.txt already exists
since the correct one is also (comparing to explanation to the last one) not precise: if in the test.txt are more lines then Exception Inner will be printed several times.

English is not my native language, hence sometimes I have problems to choose correct answer when they are not significantly different.

And here is my question: is this nuances similar to expected during test? I didn't notice such problematic answers during OCA.

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

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

Post by admin »

I went over all the options and it seems ok. The correct option says, "It will print Exception Inner if test.txt exists and test2.txt does not exist." and it is precise and indeed correct.

The last option is not correct because as explained in the explanation, even if test2.txt already exists, new line characters will not be copied over. Therefore, the statement is incorrect. The content of test1.txt will not copied over to text2.txt exactly as it it.
If you like our products and services, please help us by posting your review here.

lveto15
Posts: 27
Joined: Tue Sep 22, 2015 1:01 pm
Contact:

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

Post by lveto15 »

I agree with the explanation.

But during the test I have choosen the wrong answer based on this case. My test.txt content is:
1,2,3
4
The result is (exception printed several times):
Inner java.nio.file.NoSuchFileException: result.txt
Inner java.nio.file.NoSuchFileException: result.txt
The correct answer mention print without saying how many times. I assumed - once - and based on it decided that it is wrong answer.

This is reason why, for me, this answer is not precise and why I ask if I should pay attention to such triffles.

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

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

Post by admin »

Ok, I see your point. You don't need to worry about it too much. If there were an option saying "None of the above", then the correct option might be problematic but here, you need to go with the best option, which is option 2.
The option doesn't say anything about how many times it will print. So it is ok. A bit imprecise, yes, but still correct.
If you like our products and services, please help us by posting your review here.

lveto15
Posts: 27
Joined: Tue Sep 22, 2015 1:01 pm
Contact:

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

Post by lveto15 »

Thank you, everything is clear.

mrmuiz
Posts: 49
Joined: Mon Jul 27, 2015 4:34 am
Contact:

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

Post by mrmuiz »

Shouldn't this be under "NIO 2" section?

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

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

Post by admin »

It was put in "Character and Binary Streams" section because it is dealing with stream and text content of a file. It does use NIO2 stuff as well but not really sure which exact objective should it fall under.
-Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests