File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes working of join() methord in Thread 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 "working of join() methord in Thread" Watch "working of join() methord in Thread" New topic

working of join() methord in Thread

Gaurav Chhabras
Ranch Hand

Joined: Sep 21, 2005
Posts: 126
can someone please tell me the exact working of " join() " methord in Thread.

Kris Krason

Joined: Aug 05, 2005
Posts: 25
This method waits until the thread (for which it was called) dies (ends its run() method)

Kris Krason<br />SCJP1.4 (96%)<br />SCJP1.5 (91%)<br /> <br />See my <a href="" target="_blank" rel="nofollow">Code Complete review</a><br /> <br /><a href="" target="_blank" rel="nofollow">Pseudocode Programming Process</a>
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Thread.join () method lets one thread to join to the end of other thread.
It will run only after the other thread completes the execution.

If a thread named 'x' cannot do it's work until other thread 'Y' completes then 'X' should join 'Y' Now X will run only after 'Y' completes it's work
[ October 14, 2005: Message edited by: Srinivasa Raghavan ]

Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
I agree. Here's the link:
subject: working of join() methord in Thread
It's not a secret anymore!