wat is class level lock and object level lock
Answer Posted / ask
Class Lock - If a static method is marked as Synchrnozied
and called by a Thread, the whole Class will be locked
until the method execution completed.
Object Lock - If a non-static method is marked as
Synchronzied and called by a Thread, the current instance
(Object) will be locked util the method execution completed.
| Is This Answer Correct ? | 53 Yes | 5 No |
Post New Answer View All Answers
What are the main differences between notify and notifyAll in Java?
How can we make a class virtual?
How can I right-justify a string?
what is difference betweem home interface and remote interface?
How can you generate random numbers in java?
Which list is sorted in java?
What exceptions occur during serialization?
What is the purpose of using javap?
How do you use equal in java?
How a variable is stored in memory?
Why we use set in java?
what do you understand by the term string with respect to java?
How does compareto method work?
How does a cookie work in Servlets?
What is the difference between an object-oriented programming language and object-based programming language?