File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes threads?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "threads??" Watch "threads??" New topic


srikanth reddy
Ranch Hand

Joined: Jul 28, 2005
Posts: 252

hi ,
can anyone explain me the difference between the two things??
answers for the first is given by b and for the second given as b,c...
as far as i know...blocking is that one which waits for any resources(I/O) is in non-runnable state and when interrupted it goes into ready state..and Calling Thread.interrupted calling this i think shud return me true..but the answer says totally differ..i missing somewhere ..can anyone explain me.....

Thanks & Regards<br /> <br />-Srikanth
jeroen dijkmeijer
Ranch Hand

Joined: Sep 26, 2003
Posts: 132
The answers are compatible with the javadoc on Threads. Therer is a different behavior if this method dependent of the Thread's status.
In case it's blocked the interupt status is cleared (moved to runnable) and an InteruptException is being thrown, else the interupt status will be set.
I agree. Here's the link:
subject: threads??
It's not a secret anymore!