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 / ravikiran
The lock will be released & allocation depends on the scheduler
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
Implement a stack with push (), pop() and min() in O(1) time.
Why do we create public static method in java?
What is meant by class loader? How many types are there? When will we use them?
Can a string be null?
What type of language is java?
What is tree in java?
Why declare Main() method as a static in java ?
When can an object reference be cast to an interface reference in java programming?
Can we declare the static variables and methods in an abstract class?
What is the primitive type byte?
Implementations of set interface?
Explain exception chaining in java?
What is the use of generics? When was it added to the Java development Kit?
What is the difference between state-based unit testing and interaction-based unit testing?
What are the different ways of creating thread?