Java — Constructors of ThreadGroup Class | Code Factory

Index Page : Link

Donate : Link

WordPress Blog : Link

1. ThreadGroup tg = new ThreadGroup(String name)

  • Create a new Thread Group with specified group name.
  • The parent of this new group is the thread group of currently executing thread.
package com.example.thread;

2. ThreadGroup tg1 = new ThreadGroup(ThreadGroup tg, String name)

  • Creates a new Thread Group with the specified group name.
  • The parent of this new thread group specified parent group.
package com.example.thread;