Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { /***/ public static void joinThreads(Thread[] threads) { for (int i = 0; i < threads.length; i++) { try { threads[i].join(); } catch (InterruptedException e) { throw new RuntimeException(e); } } } }