Search your topic in Java2share
Home > FAQs
eXTReMe Tracker

Multi Threading FAQs

Untitled Document

Q49. What is DeadLock? Is it possible to resolve DeadLock situation?
Ans.   If two Threads are waiting for each other forever such type of situation is called DeadLock.
          For the DeadLock, there are no resolution techniques but prevention techniques are available.  

Q50. Which keyword causes DeadLock situation?
Ans.  Synchronized keyword is the thing to causes of DeadLock. If we are not using properly synchronized keyword the program will entered into DeadLock situation.

Q51.  How we can stop a thread explacitly?
Ans.  Thread class defines stop() method by using this method we can stop a Thread. But it is deprecated. And hence not recommended to use.

Q52.   Explain about suspend() and resume() method?
Ans.   A Thread can suspend another Thread by using suspend() method.
A Thread can resume a suspended Thread by using resume() method.