|
Answer» When program starts JVM creates a ThreadGroup named main. Unless specified, all newly created threads become MEMBERS of the main THREAD group. ThreadGroup is INITIALIZED with default priority of 10. ThreadGroup IMPORTANT methods > •getName() o name of ThreadGroup. •activeGroupCount() ocount of active groups in ThreadGroup. •activeCount() ocount of active threads in ThreadGroup. •list() olist() method has prints ThreadGroups information •getMaxPriority() oMethod returns the MAXIMUM priority of ThreadGroup. •setMaxPriority(int pri) oSets the maximum priority of ThreadGroup. When program starts JVM creates a ThreadGroup named main. Unless specified, all newly created threads become members of the main thread group. ThreadGroup is initialized with default priority of 10. ThreadGroup important methods > •getName() o name of ThreadGroup. •activeGroupCount() ocount of active groups in ThreadGroup. •activeCount() ocount of active threads in ThreadGroup. •list() olist() method has prints ThreadGroups information •getMaxPriority() oMethod returns the maximum priority of ThreadGroup. •setMaxPriority(int pri) oSets the maximum priority of ThreadGroup.
|