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 is instanceof operator used in java?
What is difference between adapter class and listener?
Why map is used in java?
What is the difference between exception and error in java?
Can you give names of Container classes?
What do you understand by abstract classes?
What is preparedstatement in java?
What is dynamic binding(late binding)?
What is the difference between variable & constant?
What do you understand by soft reference?
How to create a custom exception?
Can we sort set in java?
What is float in java?
How do you access command-line arguments within the code?
What is boolean logic?