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
What is an error in java?
Can we access the non-final local variable, inside the local inner class?
Why you should not use singleton?
What is the main function in java?
How do you sort an array in java?
why using interface interface ?
What is the difference between yielding and sleeping?
Why volatile is used in java?
What are filterstreams?
Is java a utf 8 string?
What is http client in java?
Difference difference paint() and paintcomponent()?
Why string is immutable or final in java
Does sprintf add a null terminator?
What is the synonym of procedure?