What is the difference between Synchronizing mehtod &
Synchronizing block?

Answer Posted / anjani kumar jha

In syncronizing block the object is locked.
In Syncronozing the method the method is
locked........means only one at a time only one thread can
use that method.


Thanks and Regards
Anjani Kumar Jha
9623154095

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need wrapper classes?

573


What is scope & storage allocation of static, local and register variables? Explain with an example.

562


Where is const variable stored?

530


How do you override a method in java?

535


Do I need java on my pc?

508






What is Mutex (Mutual Exclusion Object) ?

623


What is difference between arraylist and list in java?

578


Which java ide is used the most?

505


How do you differentiate abstract class from interface?

526


What are streams in java 8?

546


What is methodological framework?

571


What are the characteristics of Final,Finally and Finalize keywords.

701


What is lambda programming?

492


Which of the classes will have more memory allocated?

534


If try block is successfully executed, Then Is Finally block executed?

606