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

Answers were Sorted based on User's Feedback



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

Answer / anonymous

To my mind, this seems ambigious.
Simply another thread may try to use the same object.

Is This Answer Correct ?    1 Yes 0 No

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

Answer / 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

More Advanced Java Interview Questions

Name the method to find, if a thread is active or not?

2 Answers  


What is mdb and what is the special feature of that?

0 Answers  


How will the struts know which action class to call when you submit a form?

6 Answers   HeadStrong,


In real time project when will we use Abstract class. and what are the difference between abstract and interface.

6 Answers   DELL, FCS, Polaris, Tanla Solutions, TCS,


i want documentation of text file splitter & merger of advanced java

1 Answers   Infosys,






What is difference between object state and behavior?

0 Answers  


What is codebase in applet?

2 Answers  


How are commas used in the intialization and iteration parts of a for statement?

0 Answers  


How would you reatach detached objects to a session when the same object has already been loaded into the session?

0 Answers  


What are the thread-to-thread communcation?

1 Answers  


diff mvc1 and mvc2 wahts is mean by servlet chaining?

1 Answers   SolutionNET,


What is meant by multi-threading?

6 Answers  


Categories