Print data after all the threads finished
java, multithreading
Solution
Take a look at the method `Thread#join()`. For example:
Thread a = ...;
a.start();
a.join(); // wait until Thread a finishes
Problem
I want to print an array only after 2 threads that I created are finish run method. How can iI do that?