In brief in thread a if u spawned a thread b and want that thread a should not terminate untill thread b (as u might be expecting some output from thread b to be used in a) u have to call b.join() in a ,,this join() will not return untill the thread on which it is called is terminated ..