Possible error in ocp-816 (4/27)

Post Reply
Posts: 6
Joined: Mon Jan 13, 2020 10:05 pm

Possible error in ocp-816 (4/27)

Post by ocpjp11user »

Here is the question
1.png (27.99 KiB) Viewed 4337 times
And here is list of answers
2.png (14.35 KiB) Viewed 4337 times
I think the answer a bit confusing. The reason is that jvm won't guarantee thread order execution. And in some case second thread can run first, print a,b,c, and only after this first thread would run and remove a and b. So there is probability that sometimes all three string would be printed.

Site Admin
Posts: 9503
Joined: Fri Sep 10, 2010 9:26 pm

Re: Possible error in ocp-816 (4/27)

Post by admin »

Right, a, b, c is a possible output. That is what the option also means because it mentions what it will "not" print.
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 1 guest