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
Can an interface be defined inside a class?
What is static and final keyword in java?
What methods are used to get and set the text label displayed by a button object?
Is there any case when finally will not be executed?
Is java jre still free?
Why is java architectural neutral?
What is a two-pass assembler?
Can we use switch statement with strings?
How do generics work in java?
What is parsing and its types?
Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?
What is collection sort in java?
What is parse method?
Can you have two constructors in java?
What is the gregoriancalendar class in java programming?