File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Threads" Watch "Threads" New topic
Author

Threads

sri latha
Greenhorn

Joined: Mar 03, 2006
Posts: 27
Hi iam new to this forum.can anyone give clear about threads join()method.
ashish kediya
Greenhorn

Joined: Mar 02, 2006
Posts: 15
Originally posted by chitti tnk:
Hi iam new to this forum.can anyone give clear about threads join()method.


same as when any guest join us
ashish kediya
Greenhorn

Joined: Mar 02, 2006
Posts: 15
Originally posted by chitti tnk:
Hi iam new to this forum.can anyone give clear about threads join()method.


theard behave same as when any guest join us
ashish kediya
Greenhorn

Joined: Mar 02, 2006
Posts: 15
Originally posted by chitti tnk:
Hi iam new to this forum.can anyone give clear about threads join()method.
Edisandro Bessa
Ranch Hand

Joined: Jan 19, 2006
Posts: 584
Welcome chitti,

The join() method lets one thread join onto the end of another thread.

join() method puts the current thread (the thread which is calling the join method) to don't perform its work until the other thread enters in dead state (when its run() method finishes).

It doesn't mean the immediately after a thread finishes its run method(enters in a dead state) the other thread (that called join() method) will start to run. Maybe the thread still have to wait due to another thread with higher priority has been selected by JVM or something like this. It is up to JVM.


"If someone asks you to do something you don't know how to, don't tell I don't know, tell I can learn instead." - Myself
sri latha
Greenhorn

Joined: Mar 03, 2006
Posts: 27
thanks,i doubted which thread wheather guest thread or the thread in which it is joined executes first.now i understood.thanks
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Threads
 
Similar Threads
Determining Termination Condition for threads
For those of you who are certified ......
which variables Thread safe in servlets ?
Multi Threading
Better way of random number generation using multiple threads