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

Describe the java collections framework? , Comparable interface: The "Com...

Comparable interface: The "Comparable" allows itself to compare with other same types of object. The function compareTo() is specified in the interface. Several of the standa

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

Problem, #questionSmugglers are becoming very smart day by day. Now they ha...

#questionSmugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they

Explain the term - garbage collection, Explain the term - Garbage Collectio...

Explain the term - Garbage Collection Java  performs  garbage  collection  and  eliminates  the  need  to  free  objects  explicitly.  When an object  has  no references   to

Function and array in java script, Specifications 1. readNumberOfEntri...

Specifications 1. readNumberOfEntries → This function will ask the user for a value greater than or equal to two. The function will keep asking values as long as the user prov

Just i can told u looking for that for 6 mounth help me plea, how can i add...

how can i add script code in anouncement of a channel in a massneger the massnegr suport that but do not published it please help me please:((((((((((((((((((((((((((((((((((((((((

Luminus jewels, Luminous Jewels - The Polishing Game Byteland county is ve...

Luminous Jewels - The Polishing Game Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various lum

Applying java if and if..else statements, For this Assignment, submit the f...

For this Assignment, submit the following program: Create an application for an animal-fur trimming service. The business is open 15 weeks of the year, from April through July. The

What is a framework, A framework is made up of the set of classes which per...

A framework is made up of the set of classes which permit us to use a library in a best possible way for a particular requirement.

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