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 session in java?
What is a vararg?
Explain the hierarchy of java exception classes?
Can static methods access instance variables in java?
Why call by value prevents parameter value change?
What is a method in coding?
Can we have two methods in a class with the same name?
What is the main advantage of passing argument by reference?
What is the purpose of nested class in java?
Can we create an object of static class in java?
What is command line argument
What is type safety in java?
Why multiple inheritance is not supported by java?
Why hashset is used in java?
Does a class inherit the constructors of its superclass in java programming?