Tuesday, April 08, 2025

LATEST UPDATES
>> What is the difference between continue and break statement?  >> What is a singleton class? Give a practical example of its usage.  >> What’s the purpose of Static methods and static variables?  >> What are the various access specifiers for Java classes?  >> What is the difference between an Inner Class and a Sub-Class?    

Friday, 18 November 2016

What is the difference between a synchronized method and a synchronized block ?

In Java programming, each object has a lock. 
A thread can acquire the lock for an object by using the synchronized keyword. 
The synchronized keyword can be applied in a method level  or block level of code.

No comments:

Post a Comment

Designed By Seo Blogger Templates