Page 1 of 1

About Question enthuware.ocpjp.v8.2.1780 :

Posted: Wed Sep 23, 2015 2:21 pm
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.

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

Posted: Wed Sep 23, 2015 6:15 pm
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.

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

Posted: Thu Sep 24, 2015 1:11 am
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.

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

Posted: Thu Sep 24, 2015 1:36 am
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.

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

Posted: Thu Sep 24, 2015 2:48 am
by lveto15
Thank you, everything is clear.

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

Posted: Thu Dec 03, 2015 6:37 am
by mrmuiz
Shouldn't this be under "NIO 2" section?

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

Posted: Fri Dec 04, 2015 8:40 pm
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.