aspose file tools*
The moose likes Beginning Java and the fly likes About the join() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "About the join() method" Watch "About the join() method" New topic
Author

About the join() method

Milton Ochoa
Ranch Hand

Joined: Oct 23, 2007
Posts: 336

Hi everyone,

Today i was studing about Threads...

Can someone explain me about the method "join()"

I know it a few but i not sure if my aknowlege is wrong.

This is what I thing about the join() method:

lets see this code:




I thing that when the join method of the thread t run, put back the main thread (with BACK i mean in the wainting/bloqued State. <- this is correct???) And run the threat t freely, maybe with another thread to the same time (another threads moving the threads back and forth between the runnable state and the running state.)

Thank you
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Your code starts a new thread, then asks the main thread to wait (blocked, but interruptible) until the new thread finishes.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Milton Ochoa
Ranch Hand

Joined: Oct 23, 2007
Posts: 336

Now i know about the join method

very thankz
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About the join() method