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.
Answers were Sorted based on User's Feedback
Answer / ejp
The lock is released when the holding thread exits the
synchronized block.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / ejp
Throwing the exception exits the synchronized{} block so
that answer doesn't actually add anything.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ravikiran
The lock will be released & allocation depends on the scheduler
Is This Answer Correct ? | 0 Yes | 3 No |
What is an object in java and how is it created?
Can we increase array size dynamically in java?
What do you mean by Function Overloading in java?
explain System.out.println()
what type of questions asked for barclays technologies pune please send urgent
What is the difference between throw and throws in java?
What does file separator do in java?
What are assembly attributes?
What is java util concurrentmodificationexception?
Hey buddy.. can you please tell me about the use of marker interface? And is there any link between marker interface and factory methods? Thanks in advance.
In a my eclipse editor if i want to switch from jdk 1.4 to jdk 1.6 how to do that???? Initially i have jdk1.4
What is method in research paper?