posted 17 years ago
If you call join() on a thread, it won't return until that thread terminates. So what join() does is wait for a thread to complete.
Imagine you want to start ten worker threads, then do something when all ten are finished. You'd create the ten threads, store them in an array, the start them all. Then you use a for loop to call join() on each one. When the for loop completes, all then threads have finished their work.