Page 1 of 1

About Question enthuware.ocpjp.v7.2.1483 :

Posted: Wed Oct 17, 2012 7:54 pm
by ETS User
is wrong, for me to compile and run without any problems, the result is 10

Re: About Question enthuware.ocpjp.v7.2.1483 :

Posted: Thu Oct 18, 2012 6:15 am
by admin
As explained in the explanation, it is not possible to determine which thread will run first. So even if you get 10 every time you run it, you cannot rely on this fact that it will always print 10.

HTH,
Paul.

Re: About Question enthuware.ocpjp.v7.2.1483 :

Posted: Thu Jul 23, 2015 3:08 pm
by alkour
Hi Paul.

Could you explain what does it mean volatile modifier and how it influnce output.

Re: About Question enthuware.ocpjp.v7.2.1483 :

Posted: Thu Jul 23, 2015 7:38 pm
by admin