If u dont wana updgrade to jdk1.6 ,using thread.join() is recommended..
I am spawning some threads in my program to perform db related tasks..
and in order to make my program wait till those...