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
What is a parameter used for?
What are 3 boolean operators?
What is better - 'bit-shift a value' or 'multiply by 2'?
how to one war file class to another war file class?
What does @param args mean in java?
Is void a keyword in java?
Which is faster string or stringbuilder?
What is java object name?
What is the difference between array and array list in java?
What kind of variables can a class consist?
What is the difference between serial and throughput garbage collector?
How can you handle java exceptions?
What is data type example?
What is a condition in java?
What is the difference between break and continue statements?