Mark Jame wrote:But, if I implement my run method using try-with-resources I cannot catch InterruptedException, where does it go and/or where can I catch it?
Says who? A
try-with-resources statement can have
catch and
finally blocks just like an ordinary
try statement. In a
try-with-resources statement, any
catch or
finally block is run after the resources declared have been closed.
This is perfectly legal code. Catching an InterruptedException using a try-with-resources: