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 / ejp
Throwing the exception exits the synchronized{} block so
that answer doesn't actually add anything.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the types of casting?
What are the different ways of creating thread?
What are the limitations of procedural programming approach?
What do you mean by ternary operator in java?
What is map java?
What is the maximum size of a string in java?
What do you mean by inner class in java? Explain
can I implement my own start() method? : Java thread
How to convert string to char and vice versa?
If you do not want your class to be inherited by any other class. What would you do?
What does math floor () do?
What do you mean by local class?
What best practices should you follow while writing multithreaded code in java?
what is thread? What are the high-level thread states? : Java thread
How a string is stored in memory?