This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes join() method of thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "join() method of thread" Watch "join() method of thread" New topic
Author

join() method of thread

Mohan Ramanna
Ranch Hand

Joined: Jun 26, 2000
Posts: 36
can someone throw liht on the join () method of thread.
a clear explanation is expected?
thanks in advance
- mohan
Prasanna Joshi
Greenhorn

Joined: Apr 25, 2000
Posts: 11
In javadoc --
Waits for this thread to die.
Practically a use of join is to block until the thread
completes it operation ie if u start a thread in main()
and u want the main to block until the thread completes
it operation.you can use join,so when the thread completes
it run ie dies,it unblocks the execution of main()
eg public static void main(String [] args)
{
Thread t = new Thread();
t.start();
t.join();
}
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: join() method of thread
 
Similar Threads
join method
making a thread wait
join()
Thread Joining and ExecutorService
How to wait until all threads finishes task?