wat is class level lock and object level lock
Answer Posted / michael selvan
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.
Note : If we declare as a any static variables or methods
those will be stored in class area. So, if the method is
synchronized static . It'll lock the complete class.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Which collection is sorted in java?
What do you mean by jjs in java8?
Explain about map interface in java?
Can list have duplicates in java?
What is the static block?
What do you mean by Hash Map and Hash Table?
What is a local block?
How to sort a collection of custom Objects in Java?
I want to re-reach and use an object once it has been garbage collected. How it's possible?
How do you allocate memory to object?
Where are register variables stored?
How many characters is 2 bytes?
What is compareto () in java?
Can we nested try statements in java?
How do you check if a number is a perfect square?