aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Thread" Watch "Thread" New topic
Author

Thread

Kaleem Haqqi
Greenhorn

Joined: Aug 01, 2001
Posts: 22
which two CANNOT directly cause a thread to stop executing?
a. exiting from a synchronized block
b. calling the wait method
c. calling the notify method on an object
d. calling a read method on an InputStream object
e. calling the setPriority method on a Thread object
I choose d and e. Am I right?


<B>-Kaleem Haqqi</B><BR>Java is mind work. Having the right frame of mind is essential.
Gagan Indus
Ranch Hand

Joined: Feb 28, 2001
Posts: 346
I Guess , Ans a) n e) are correct
b) Calling wait method 'll stop da Thread , until its notified on da same object
c) Calling notify on some object , CAN stop current thread , if there are any other Thread(s) to be notified , waiting on same object
d) Read() n write() methods in Streams are Blocking , it means they do not return until done their job
------------------
Gagan (/^_^\) SCJP2
Die-hard JavaMonk -- little Java a day , keeps u going .


Gagan (/^_^\) SCJP2 SCWCD IBM486 <br />Die-hard JavaMonk -- little Java a day, keeps you going.<br /><a href="http://www.objectfirst.com/blog" target="_blank" rel="nofollow">My Blog</a>
Ragu Sivaraman
Ranch Hand

Joined: Jul 20, 2001
Posts: 464

Yes i do think a and e are correct
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Thread