What does the keyword "synchronize" mean in java, JAVA Programming

Assignment Help:

What does the keyword "synchronize" mean in java. What are the usage and disadvantages of synchronization?


Related Discussions:- What does the keyword "synchronize" mean in java

How would you interact between servlets and applets? , We may use the java...

We may use the java.net.URL and java.net.URLConnection classes to start a standard HTTP connection and "tunnel" to a Web server. The server then gives this information to the s

Swing, can we develop paint user can draw his charcters and images in swing...

can we develop paint user can draw his charcters and images in swing

Object oriented programming, Theobjectiveoftheassignment is tofamiliarize y...

Theobjectiveoftheassignment is tofamiliarize youwithinheritance, GUIand abstraction. Create anabstractclass named that includesprivatefields for the InternationalStandard BookNumbe

Javascript and coldfusion, Overview Demonstrate your knowledge of JavaS...

Overview Demonstrate your knowledge of JavaScript and ColdFusion by implementing the following functionality: Contact form • The following validation error message shou

Url instance and url connection instance, Difference between URL instance a...

Difference between URL instance and URL Connection instance? Ans) A URL instance shows the location of a resource, and a URL Connection instance shows a link for accessing or co

Cyclos ussd and mobile banking ivr module, Cyclos USSD and mobile banking I...

Cyclos USSD and mobile banking IVR module Project Description: We previously have a Cyclos mobile banking solution deployed on our server with SMS banking module. The solu

Develop a farm production system, Develop a Farm Production System Proje...

Develop a Farm Production System Project Description: I want software that will allow me to input/record the each day production of our farm and allow me to view the data bac

What are trojan horses, What are Trojan Horses? Trojan Horses are unlik...

What are Trojan Horses? Trojan Horses are unlike viruses usually they are stand-alone programs. The look such as what they are not. They appear to be something harmless and int

Describe final arguments, Describe final arguments? At last, you can de...

Describe final arguments? At last, you can declare in which method arguments are final. This means that the techniques will not directly change them. Because all arguments are

Gen keys, Write a Java class that generates a random integer (between 1 and...

Write a Java class that generates a random integer (between 1 and 250). Call the class GenKeys. GenKeys should have a least one method that returns the integer random number. Gen K

12/3/2013 1:49:04 AM

Synchronize is used when you want to create your methods thread protected. The disadvantage of synchronise is it would end up in slow down the program. And if it will not be handled properly it can end up in dead lock.

1. Only use synchronization when writing multithreaded code as there is a speed cost associated with its use.

2. In case of synchronized method modifier, the byte code generated is similar as non-synchronized method. The only difference is that a flag called ACC_SYNCRONIZED property flag in method''s method_info structure is set if the synchronized method modifier is present.

3. Also, synchronized keyword can create the code larger in size if used in the body of the method as byte code for monitor enter or monitor exit is generated in addition to any exception handling.

 

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd