I have two threads, and I need the one to start, when the first one ends. How could I do it? I have tried something, in the second thread, the one that I want to run after the first one, I put thread2.join (); . I do not know if that will work, but I read that it worked.