JerkyThread - com.enthuware.ets.scjp.v6.2.144
Moderator: admin
JerkyThread - com.enthuware.ets.scjp.v6.2.144
Could 2 0 4 not be a possible output as there's no guarantee which JerkyThread starts first?!?
Last edited by admin on Wed Jan 18, 2012 7:32 am, edited 1 time in total.
Reason: Updated the subject to include question id
Reason: Updated the subject to include question id
-
- Site Admin
- Posts: 10078
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: JerkyThread
No, it is not the individual threads that are printing the value. It is the second for loop in the main thread, which is printing the value for other thread's data, and it is printing the values for the threads in order- thread1, thread2, and thread3. So first value will always be 0.
HTH,
Paul.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: Bing [Bot] and 14 guests