Let me try.
a) Allow threads to be manipulated as a group
Yes.
The proof is in the pudding. Name of the class itself suggests it is a group of threads. If you are curious, take a look at API documentation about the methods it supports.
b) Provide support for ThreadDeath listeners
May be.
I am not sure what they mean by this. However, you can subclass ThreadGroup and override the uncaughtException method. This method gets called when a
thread in the group is about to die due to an unhandled exception.
c) May contain other ThreadGroups
Yes!
A Thread group can contain threads or threadgroups.
d) Must contain threads of the same type
Nope.
Not necessarily. You can mix and match both user and daemon threads and assign them to a same group.
Hope this helps.
BTW - I am not sure if ThreadGroups are included in
SCJP objectives.
Ajith
[This message has been edited by Ajith Kallambella (edited July 26, 2000).]