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 Question on join() method for Bert Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Question on join() method for Bert" Watch "Question on join() method for Bert" New topic

Question on join() method for Bert

Mohit Goyal
Ranch Hand

Joined: Nov 09, 2003
Posts: 65
Well I want to know that:
if the thread on which the join() method is invoked is not alive
bcoz either its run method completed or it exited the run method due to an exception)
then will the current thread stop running at all i.e. will it kepp running or will it stop running and immediately become runnable
Bert Bates

Joined: Oct 14, 2002
Posts: 8898
Mohit -
I don't believe it's specfied... my guess is that it will vary from JVM to JVM. On our mocks we specify (or try to ), that the thread is alive.

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
I agree. Here's the link:
subject: Question on join() method for Bert
It's not a secret anymore!