What is waiting state? In what ways a thread can enter into
waiting state?
Answer Posted / sandya
In 3 ways:
1.A Thread can enter the waiting state by invoking it's
sleep() method
2.By blocking on i/o by unsuccessfully attempting to
acquire an object's lock or by invoking an object's wait()
method.
3.It can also enter the waiting state by invoking it's
suspend() method.
| Is This Answer Correct ? | 27 Yes | 2 No |
Post New Answer View All Answers
How are commas used in the intialization and iteration parts of a for statement?
What must a class do to implement an interface?
Are we allowed to change the transaction isolation property in middle of a transaction?
Can I import same package/class twice? Will the jvm load the package twice at runtime?
How can I avoid validating a form before data is entered?
What do you need to set-up a cluster with jboss?
Are enterprise beans allowed to use thread.sleep()?
What is metaspace?
What restrictions are placed on the values of each case of a switch statement?
What are the services in RMI ?
wahts is mean by dynavalidatorform in struts/
What is the difference between the string and stringbuffer classes?
What are the benefits of detached objects?
What is the difference between the session.update() method and the session.lock() method?
What classes of exceptions may be caught by a catch clause?