Thread.activeCount() 主流IDE返回值

 Thread.activeCount()返回值

public class ThreadActiveCountTest {
	 public static void main(String[] args) {
		 System.out.println(Thread.activeCount());
	 }
}

    Thread.activeCount()此方法返回活动线程的当前线程的线程组中的数量。
    IDE返回的值不相同,Eclipse中返回1,Intellij idea中返回2。

猜你喜欢

转载自xuhuanblog.iteye.com/blog/2407111