Question: Java - Provide a very short quick comment on each area with /*comment*/ listed explaining what the code is doing public class CreateThreadGroups { public

Java - Provide a very short quick comment on each area with /*comment*/ listed explaining what the code is doing

public class CreateThreadGroups { public CreateThreadGroups() { /* Comment Here */ ThreadGroup alpha = new ThreadGroup("alpha"); ThreadGroup beta = new ThreadGroup("beta"); ThreadGroup theta = new ThreadGroup(alpha, "theta");

/* Comment Here */ (new Thread(alpha, new GroupWorker())).start(); (new Thread(alpha, new GroupWorker())).start(); (new Thread(alpha, new GroupWorker())).start(); (new Thread(beta, new GroupWorker())).start(); (new Thread(theta, new GroupWorker())).start(); (new Thread(theta, new GroupWorker())).start(); }

class GroupWorker implements Runnable { public void run() { while (true) { try { Thread.sleep(1000); for (int i = 0; i < 1000000; i++) ; } catch (InterruptedException ie) { } } } } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!