try{...}
catch(InterruptedException e)
{ }
I wonder what happen after InterruptedException is thrown
is thread interrupted status set to true or not ?
try{...}
catch(InterruptedException e)
{ }
I wonder what happen after InterruptedException is thrown
is thread interrupted status set to true or not ?
It depends on what throws the InterruptedException. But the good practice, followed by methods of the JDK, is to clear the interrupt status when the exception is thrown.
See Object.wait() for example:
if any thread interrupted the current thread before or while the current thread was waiting for a notification. The interrupted status of the current thread is cleared when this exception is thrown.