What is an object's lock and which object's have locks?<br/>
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. What is an object's lock and which object's have locks?
Ans. An object's lock is a mechanism that is used by multiple threads to obtain synchronized access to the object. A thread may execute a synchronized method of an object only after it has acquired the object's lock. All objects and classes have locks. A class's lock is acquired on the class's Class object.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multi threading   scheduling   synchronizing


Related Questions

  Explain Thread States ?
  What is the difference between time slicing and preemptive scheduling ?
  Why threads block or enters to waiting state on I/O?
  What is the difference between yield() and sleep()?
  Can a lock be acquired on a class ?
  What state does a thread enter when it terminates its processing?
  Difference between yield() and sleeping()?
 What is Time slicing with respect to Threads ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: