Here is my application:
public class NamedThread extends Thread {
/* This will store name of the thread */
String name;
@Override
public void r
If we print all the threads then we can observe that default thread group is System and inside the system, there are different threads and groups like :
Group[system:class java.lang.ThreadGroup]
Reference
Finalizer
Signal Dispatcher
Group[main:class java.lang.ThreadGroup]
main
Monitor
Group[InnocuousThreadGroup:class java.lang.ThreadGroup]
Common-Cleaner
In java code default thread group is main. When we print active thread count then it will give an answer as 2 because the main thread group has two threads main and monitor.