In Java, suppose if I start 1000 threads with a loop as below, is there any way I can monitor the number of threads actually running and the CPU resources that the threads consume with task manager?
for(int j=0; j<=1000; j++)
{
MyThread mt = new MyThread ();
mt.start ();
}
You can use
VisualVMorJConsoleor any other monitoring tool