Hi guyz.I have not understand the function of join().A/C to me it waits to join the curently running thread to which it is joined. If it is correct then plz. explain it Bye. Viki. ------------------ Count the flowers of ur garden,NOT the leafs which falls away!
In practical terms:- say you need to do two time-consuming, I/O bound jobs A and B. Say they are implemented in two Runnable classes A and B. You need both to be finished in order to carry on. Because they are I/O bound, it makes a lot of sense to run A and B in parallel using threads:The b.join() statement ensures that the doWork method will only return once both job A and job B have been finished. - Peter