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
Explain throw keyword in java?
Why stringbuilder is not thread safe in java?
Why to use nested classes in java?
who can i handle multiple client in RMI
Why is singleton class used?
What are the types of arrays in java?
What is passing value java?
What is a treemap in java?
When we should use serialization?
What are accessor methods in java?
Which class is the superclass for all the classes?
If a method is declared as protected, where may the method be accessed?
What is the file type?
What are measurable parameters?
What is the abstraction?