DEVFYI - Developer Resource - FYI

What happens when you invoke a thread's interrupt method while it is sleeping or waiting?

Java Interview Questions and Answers (part 2)


(Continued from previous question...)

296. What happens when you invoke a thread's interrupt method while it is sleeping or waiting?

When a task's interrupt() method is executed, the task enters the ready state. The next time the task enters the running state, an InterruptedException is thrown.

(Continued on next question...)

Other Interview Questions