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

Name three component subclasses that support painting?

850


Why use POJO when I can use hashmap

2327


How to determine SGA site?

2203


what is the use of State Factories?

2139


How task's priority is used in scheduling?

2049


Explain the difference between object state and behavior?

805


How substring() method of string class create memory leaks?

804


Define prototype?

840


To identify IDL language what mapping mechanism is used?

3687


What is the difference between long.class and long.type?

811


What are local interfaces? Describe.

934


What is the map interface?

884


How would you detect a keypress in a jcombobox?

918


What modifiers may be used with an interface declaration?

846


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

967