About Question enthuware.ocpjp.v8.2.1276 :

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

Moderator: admin

Post Reply
ibugaienko
Posts: 6
Joined: Wed Dec 14, 2016 11:29 pm
Contact:

About Question enthuware.ocpjp.v8.2.1276 :

Post by ibugaienko »

Hi!

I believe one of the correct answers is not entirely accurate, namely "Nothing can be said for sure". Is this an example for "exam-special" question wording? If not, maybe it would be more appropriate to mention that
"1 2" or "2 1" will be printed at least once as a more accurate option?
or
'1' and '2' will be printed at least once each, but the order is unknown.

Thanks!

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

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

Post by admin »

There could be a deadlock also.
If you include all the possibilities in a statement then that statement can be a certainty. i.e. Only one of 1 or 2 or 3 or 4 will happen for sure. It is only when you talk about specifics, like which the other options have mentioned, you cannot be sure what will happen. So in that context, I think the option is ok in saying that you are not sure what will happen.

HTH,
Paul.

bvrulez
Posts: 33
Joined: Sat Feb 15, 2020 12:44 am
Contact:

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

Post by bvrulez »

admin wrote:
Fri Dec 16, 2016 1:22 am
There could be a deadlock also.
There can be a deadlock. But "1" and "2" will be printed at least once, each, right?

Also, the interesting question would by why there is not a deadlock for sure. Maybe if there is just one thread working both methods, but otherwise this is not possible, right?

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

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

Post by admin »

> But "1" and "2" will be printed at least once, each, right?
Yes.
Deadlock is not guaranteed because the JVM may execute the two threads sequentially.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests