File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

join() method

 
Swati Gupta
Ranch Hand
Posts: 106
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If we use the join() method with some time argument or the sleep() method with the same time argument in the main thread ,the behaviour of main thread will remain the same?
 
Corey McGlone
Ranch Hand
Posts: 3271
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. If you provide a time argument to the join method, that thread will wait for another thread to complete executing or until the time expires, whichever comes first. Assuming the thread is not interrupted, calling Thread.sleep() will cause a thread to stop executing for the number of milliseconds supplied.
Corey
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic