62,635
社区成员




public class TestThreadWait {
public static void main(String[] args) {
Runnable run = new Runnable() {
public void run() {
System.out.println(Thread.currentThread()+"start");
DeadLoopClass dlc = new DeadLoopClass();
System.out.println(Thread.currentThread()+"over");
}
};
Thread thread1 = new Thread(run);
Thread thread2 = new Thread(run);
thread1.start();
thread2.start();
}
}
final class DeadLoopClass {
static {
if(true) {
System.out.println(Thread.currentThread()+"init DeadLoopClass");
while(true) {
}
}
}
}
final class DeadLoopClass {
static {
throw new RuntimeException();
}
}
boolean bFlag=true;
while(bFlag)
{
}