File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Threads and Synchronization and the fly likes InterruptedException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark " InterruptedException" Watch " InterruptedException" New topic
Author InterruptedException

Tom Turner

Joined: Jun 14, 2013
Posts: 2

I am a bit confused how InterruptedException always seems to be thrown when CorrectorThread is run in the code below. It always prints "Mares do eat oats1." What is causing this Interrupt? Is it the JVM deciding to do it or something? I am new to Threads :-)


Tom Turner

Joined: Jun 14, 2013
Posts: 2
Uhm ok please ignore this lol. I need new glasses. I thought the statement message = "Mares do eat oats1."; was inside the catch block. Doh!
I agree. Here's the link:
subject: InterruptedException
Similar Threads
static methods cannot be overridden ?
thread and exception!
Interrupt Handling
Regarding non-static interrupt() and join() methods.
Code confusion