What are the two ways you can synchronize a block of code?

Answer Posted / popol83

I think using mutex is the second way.
Because synchronizing an object is useless

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by method overriding?

797


Is string pool garbage collected?

777


What is :: operator in java 8?

800


What is an object in java and how is it created?

837


How do you square a number in java?

791


What are the ways to instantiate the class class?

807


List the three steps for creating an object for a class?

728


Is there a way to increase the size of an array after its declaration?

814


What initialize variables?

716


Explain Basics of OOP Language in java

801


Write a program to solve producer consumer problem in java?

766


Which variable is the independent variable?

772


What are the four pillars of java?

896


Can a final variable be initialized in constructor?

712


Can you access non static variable in static context?

790