Today we are going to learn about Java.
Core Java
Multi Threading:
Synchronization/Locking Mechanism
More than one thread shares the resources.
There are two types of Locks
1. Object Locking
2. Class Locking
* When more than one thread operates on same resources there is a chance of getting inaccurate results to overcome these methods of that class is defined as synchronized.
synchronized return type method-name(parameters)
{
statements;
}
No comments:
Post a Comment