Name: rm29839 Date: 11/12/97
If you execute the following code, you will see the thread is interrupted, however, Thread.interrupted() will return false
public class u {
public static void main(String args[]) {
Thread t = new Thread() {
public void run() {
try {
synchronized(this) {
wait();
}
} catch(Exception e) {
e.printStackTrace();
System.out.println(Thread.interrupted());
}
}
};
t.start();
t.interrupt();
for(;;) {
}
}
}
(Review ID: 19582)
======================================================================