What are synchronized methods and synchronized statements?

Answer Posted / tarunam verma

Syncronized methods are executed only after a lock is
acheived on the classes or objects specified in the methids
and after that the methids are executed

synchronized statements are the synchronised the bolck
containg the lock on some resource, statment in that block
are called synchronised statements

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where can I ask questions and make suggestions about seam?

594


Can I import same package/class twice? Will the jvm load the package twice at runtime?

649


Describe activation process?

2068


Why does the option tag render selected=selected instead of just selected?

680


Explain the advantages and disadvantages of detached objects.

577






How to implement RMI in Java?

2408


Can constructors be synchronized in java?

621


What are callback interfaces?

593


What is the difference between RMI and Corba?

2264


What do you mean by Socket Programming?

551


What is a tasks priority and how is it used in scheduling?

552


Why are my checkboxes not being set from on to off?

650


How would you reatach detached objects to a session when the same object has already been loaded into the session?

686


Is it possible to stop the execution of a method before completion in a sessionbean?

603


Where we can write Rmi registry in the code, without having to write it at the command prompt?

2265