This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Thread Program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Thread Program" Watch "Thread Program" New topic
Author

Thread Program

rex tony
Ranch Hand

Joined: Aug 29, 2007
Posts: 159
Good evening to all,


any one explain the follow of the program
regards
rex
ahmed yehia
Ranch Hand

Joined: Apr 22, 2006
Posts: 424
Here nothing special is happening, you are creating and starting two threads which run concurrently. Try the below program (added yield()) and notice how threads take turns although output isnt guaranteed in both cases.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Thread Program
 
It's not a secret anymore!