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
What is the difference between class forname and new?
Which methods are used during serialization and deserialization process?
What is the difference between an interface and an abstract class?
Will set allow duplicates in java?
What is java literals?
What are reference variables in java?
Write a program to find the greatest of three numbers in java?
How is it possible for two string objects with identical values not to be equal under the == operator?
Why is it called buffering?
How many days will it take to learn java?
Differentiate between stringbuffer and string?
What is the use of runnable interface?
what do you mean by classloader?
What does sizeof return?
What is jvm? Why is java called the platform independent programming language?