I have placed thread is alive in a loop , so when the thread finish its work so i will start another work.... but this makes program heavier. is there any other method

while(thread1 is alive)

getvalue from thread1 and start thread2

Use the join() method from the Thread class - it waits until the thread has finished. Plenty of examples on the web.

Of course, that raises the question of why you are using threads. I mean, if all the main program (or the thread that started that other thread) is going to do is wait until the other thread is finished, then the thread is nothing but extra overhead.

there are mulitple threads , not connected with main.... when one thread ends other take its place and then other... Its a practice excerise for checking threads working from different ways.... :)