What will happens, when a thread cannot acquire a lock on
an object?

Answer Posted / sudarsan

It will be waiting in runnable stage untill it acquire
object lock.
We call explicitly send this thread to blocked stage using
wait() or sleep() methods to avoid wasting cpu time.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why a client should be multithreading? Explain.

591


What is jboss?

571


What is bean? Where can it be used?

575


difference between  ejb,struts,hibernate,spring and jsp

2300


What is in-memory replication?

557






Whats new with the stop(), suspend() and resume() methods in jdk 1.2?

581


Can I run seam outside of jboss as?

638


what are memory considerations of jsp compares to other web components?

6009


what are the advantages of JTA over JTS?

1669


Why do threads block on i/o?

678


What is the form of storage space in java?

1735


Why use POJO when I can use hashmap

2045


Difference between hashmap and hashtable?

604


Where we can write Rmi registry in the code, without having to write it at the command prompt?

2256


What is a clone?

572