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


Please Help Members By Posting Answers For Below Questions

What are the types of casting?

594


What are the different ways of creating thread?

568


What are the limitations of procedural programming approach?

525


What do you mean by ternary operator in java?

556


What is map java?

515






What is the maximum size of a string in java?

549


What do you mean by inner class in java? Explain

584


can I implement my own start() method? : Java thread

552


How to convert string to char and vice versa?

515


If you do not want your class to be inherited by any other class. What would you do?

561


What does math floor () do?

552


What do you mean by local class?

512


What best practices should you follow while writing multithreaded code in java?

541


what is thread? What are the high-level thread states? : Java thread

786


How a string is stored in memory?

578