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
How will you initialize an Applet?
Why is java so important?
What is an object in java?
Explain the difference between abstract classes and interfaces in java?
What is comparable and comparator interface? List their differences
What is variable and rules of variable?
What is nan inf?
What is the reason behind using constructors and destructors?
What is an off by one error in java?
What is mean by collections in java?
What is boolean example?
What is constructor chaining in java?
what is a green thread? : Java thread
Give reasons supporting that string is immutable.
How do you sort objects in java?