Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Craig Daniels   on Oct 19 In Java Category.

  
Question Answered By: Dennis Hayes   on Oct 19

The only problem  with your code  is the max val of i in the loop.
Increase it to a high value, you'll see the results. Hope the issue
is self-explanatory. You first thread  completes much before the
second thread could start  even. Thatz why you see them printed
sequentially.

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on problem in thread concurrency Or get search suggestion and latest updates.


Tagged: