Page 1 of 1

Possible error in ocp-816 (4/27)

Posted: Wed Mar 04, 2020 4:33 am
by ocpjp11user
Here is the question
1.png
1.png (27.99 KiB) Viewed 12715 times
And here is list of answers
2.png
2.png (14.35 KiB) Viewed 12715 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.

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

Posted: Wed Mar 04, 2020 4:50 am
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.