About Question enthuware.ocpjp.v7.2.1483 :

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

Moderator: admin

Post Reply
ETS User

About Question enthuware.ocpjp.v7.2.1483 :

Post by ETS User »

is wrong, for me to compile and run without any problems, the result is 10

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

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

Post 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.

alkour
Posts: 30
Joined: Tue Mar 24, 2015 2:59 pm
Contact:

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

Post by alkour »

Hi Paul.

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


Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests