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
Throwing the exception exits the synchronized{} block so
that answer doesn't actually add anything.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
do I need to use synchronized on setvalue(int)? : Java thread
Define Multiprogramming and Multiprocessing in java.
What is oop principle in java?
What is difference between arraylist and list in java?
Why put method is idempotent?
What package is math in java?
What is the difference between the reader/writer class hierarchy and the inputstream/outputstream class hierarchy in java programming?
What is a predicate method?
Who developed java?
What is a class in java?
What are the new features in java 8?
What is difference between stringbuffer and string?
Differences between external iteration and internal iteration?
What is entry set in java?
Why do we need hashmap in java?