执行下面代码
public class TestMain {
public static void main(String[] args) {
new Thread(new Runnable() {
private Object obj = new Object();
@Override
public void run() {
while(true){
System.out.println("rr");
try {
obj.wait(5000);
} catch (Exception e) {
}
}
}
}).start();
}
}
等待的线程会增多,请问为啥