Synchronized Keyword in Java

Advertisements

Super Keyword in Java Volatile Keyword in Java

Synchronized Keyword in Java

Synchronized Keyword is used for when we want to allowed only one thread at a time then use Synchronized modifier. If a method or block declared as a Synchronized then at a time only one thread is allowed to operate on the given object.

Synchronized Keyword in Java

Synchronized is a Modifier which is applicable for the method or block, we can not declare class or variable with this modifier.

Advantage of Synchronized

The main advantage of Synchronized keyword is we can resolve data inconsistency problem.

Dis-Advantage of Synchronized

The main dis-advantage of Synchronized keyword is it increased the waiting time of thread and effect performance of the system, Hence if there is no specific requirement it is never recommended to use synchronized keyword.


Super Keyword in Java Volatile Keyword in Java

Google Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements