wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "join() method of thread" Watch "join() method of thread" New topic

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

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();
I agree. Here's the link: http://aspose.com/file-tools
subject: join() method of thread
Similar Threads
How to wait until all threads finishes task?
join method
making a thread wait
Thread Joining and ExecutorService