Problem description : -
Step 1: Take input FILE_NAME from user at main thread.
Step 2: Perform 10 operations on
Check if all child threads are dead, every n seconds. Simple, yet effective method:
boolean allDead=false; while(! allDead){ allDead=true; for (int t = 0; t < threadCount; t++) if(threads[t].isAlive()) allDead=false; Thread.sleep(2000); }