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. |
|
| ||||
Interview Questions and Answers | ||||
| ||||
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 ? | ||||