[Solved] How to use .join() with Thread at this particular Thread
Assume you’ve created a class for your Thread like Thread myThread = new Thread(new Runnable(…)); myThread.start(); you can wait for this thread to finish by adding the line myThread.join() as last line of yout while loop. This will cause the main-thread to wait for myThread to finish before it continues. So your code would look … Read more