Hi !
My doubt is on InterruptedException in java .
I am asking my doubt based on sleep method in java.
When we call interrupt on a thread which is in sleep state then InterruptedException is thrown.
Below are my doubts:
1)Imagine that we have called interrupt method on a thread named Thread1,which has come out from a sleep.
Then will Thread1 throws InterruptedException?
2)Imagine that we have called interrupt method on a thread named Thread2,which will go to sleep.
That means now Thread2 is not in sleep state.
Then will Thread2 throws Interrupted exception?