What happens when you invoke a thread's interrupt method while it is sleeping or waiting? Ans. When a task's interrupt() method is executed, the task enters the ready state. The next time the task enters the running state, an Interrupted Exception is thrown. - Study24x7
Social learning Network
30 Jan 2024 10:24 AM study24x7 study24x7

What happens when you invoke a thread's interrupt method while it is sleeping or waiting? Ans. When a task's interrupt() method is executed, the task enters the ready state. The next time the task enters the running state, an Interrupted Exception is thrown.

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles