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 / jitu
The lock is released when the holding thread exits the
synchronized block or an exception is occurred in execution.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How does linkedhashmap work in java?
What is compareto?
What is the difference between actual and formal parameters?
Explain the use of shift operator in java. Can you give some examples?
Explain the JDB in depth & command line.
Explain illegalmonitorstateexception and when it will be thrown?
Explain access specifiers?
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
How does multithreading take place on a computer with a single cpu?
What is type parameter in java?
What does jre stand for?
How do you create a method in java?
What is java used for?
What is a stack class in java ?
Differentiate between overriding and overloading cases?