Class ThreadGroup in Java

Class ThreadGroup in Java: A ThreadGroup is a set or collection of threads. We can include…