private static void interruptedThread(Thread thread) throws InterruptedException {
  thread.interrupt();
  thread.join();
}

private static void interruptedThread ( Thread thread ) throws InterruptedException { thread . interrupt ( ) ; thread . join ( ) ; }
interrupt thread and join .
