aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes suspend in 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 "suspend in Threads" Watch "suspend in Threads" New topic
Author

suspend in Threads

pallavi utukuri
Ranch Hand

Joined: Feb 10, 2004
Posts: 182
Which of the following are recommended ways a Thread may be blocked?
1) sleep()
2) wait/notify
3) suspend
4) pause
Ans:1,2
suspend also causes the Thread to be blocked so should suspend not be seclected in this scenario as it is deprecated


Thanks,<br />Pallavi
Karel KoboojBot
Ranch Hand

Joined: Apr 09, 2004
Posts: 35
As it is deprecated, I assume that it is not a recommended way of blocking a thread because in future versions of Java the method may not be supported (very well) anymore.
pallavi utukuri
Ranch Hand

Joined: Feb 10, 2004
Posts: 182
ys it is not recommended but in exam is it an invalid option as it is not depricated
pallavi utukuri
Ranch Hand

Joined: Feb 10, 2004
Posts: 182
ys it is not recommended but in exam is it an invalid option as it is *depricated
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: suspend in Threads