Hi Friends, I am beginner in java. what i know about
synchonized keyword is,If more that one 1 thread tries to
access a particular resource we can lock the method using
synchronized keyword. Then after that how the lock is
released and how next thread access that.Please explain with
example.
Answer Posted / ejp
The lock is released when the holding thread exits the
synchronized block.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Difference between concurrent hashmap and hashtable and collections
How do you calculate square roots?
What is cr keyboard?
Explain yield() method in thread class ?
What is variable and constant explain with example?
How hashmap works in java?
Explain where variables are created in memory?
What do you mean by thread safe?
What is the difference amongst jvm spec, jvm implementation, jvm runtime ?
What is contract between hashcode and equal method?
Which package is used for pattern matching with regular expressions?
What is class and its types?
Explain the public class modifier?
What is the purpose of skeleton and stub?
What are the advantages of java inner classes?