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 main difference between variable and constant?
What is the difference between conversation & casting?
What is a boolean expression in java?
What is difference between fail-fast and fail-safe?
Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?
What is independent and dependent variables in research?
Which class is used by server applications to obtain a port and listen for client requests?
What is predicate in java?
What is meant by main method?
Explain the difference between jvm and jre?
What is object english?
How to reverse a string in java?
What is identifier with example?
What is finally in Java?
Is it possible to use Semaphore/ Mutex in an Interrupt Handler?