Advantages of Object Synchronization over Resource Synchronization in Java

Main Article Content

Mr. Chetan Singh Khinchi
Mr. Vaibhav Sharma, Mr. Ronak Jain


In java synchronization is basically of two types – First is , Method(Resource) synchronization and Second one is Block(Object) synchronization . Both of them adds to the security of code while multiple threads are in action and have very minute differences over one another. People often get confused with both of the ways and do not understand the usage and applicability of this ways by themselves[1]. Here I suggest that rather than using Method(Resource) synchronization for security of code in multithreading in java one must give preference to the Block(Object) synchronization .This paper is an Analytical as well as a Suggestive paper which actually describes both the ways with all minute differences covered with a proper analysis of usage and applicability, and then suggests that why one must use Block(Object) synchronization over Method(Resource) synchronization in java while multiple threads are in action.

Keywords: Synchronization , block , resource , object , method , Monitor , thread, sleep , join


Download data is not yet available.

Article Details