What are synchronized methods and synchronized statements?

Answer Posted / sainaveen

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 methods are executed after lock is acieved on
class or object specified in the synchronized statement

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is message driven beam?

824


What are various types of class loaders used by jvm?

749


What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?

811


What is glasgow?

821


What is Remote Server?

1921


What is a policy?

2064


What are the benefits of detached objects?

837


Name the eight primitive java types.

853


What class is the top of the awt event hierarchy?

861


What is meant by method chaining?

921


Which component handles cluster communication in jboss?

872


What are callback interfaces?

851


Why use a datasource when you can directly specify a connection details?

800


What is the highest-level event class of the event-delegation model?

865


how i secure my site with the https protocol.what are the steps?

2009