When you will synchronize your code?

Answer Posted / ranganathkini

synchronize is used on objects that will be used by
multiple threads to provide thread safety. It is used so
that concurrent threads get valid access to data to perform
their actions

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is an isolation level?

2207


To what value is a variable of the string type automatically initialized?

602


What is metaspace?

541


What is in-memory replication?

551


what is Activation Instantinator?

1903






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

641


What is the diffrence between a local-tx-datasource and a xa-datasource?

575


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

675


What is colon_pkg_prefixes and what is its use?

1994


what are the advantages of JTA over JTS?

1663


What restrictions are placed on the values of each case of a switch statement?

531


What is the difference between static and non-static with examples?

1354


Explain what is synchronization?

566


Why are some of the class and element names counter-intuitive?

566


What is permgen or permanent generation?

580