I\'m writing an application that has 5 threads that get some information from web simultaneously and fill 5 different fields in a buffer class. I need to validate buffer
I created a small helper method to wait for a few Threads to finish:
public static void waitForThreadsToFinish(Thread... threads) { try { for (Thread thread : threads) { thread.join(); } } catch (InterruptedException e) { e.printStackTrace(); } }