Synchronization is a process through which multiple threads share access to common objects. Java coordinates the actions of multiple threads using synchronized methods and statements. Following are the properties of synchronization:
- If a thread contains some locks and goes to sleep, then it does not release the locks.
- Only methods can be synchronized, not variables and constants.
- If two threads invoke the same method, then only one thread at a time can invoke a method.
- A thread can invoke a synchronized method on multiple objects.
- A class can have both synchronized and non-synchronized methods.
- If a class has synchronized and non-synchronized methods, then multiple threads can still access the non-synchronized methods of the class.
- Click here to download master-ciw-enterprise-developer test study guide and practice question.
- Download practice question and study guide for scbcd for exam.
- Get certified in first attempt download scdjws - SCDJWS simulation.
- Download practice question and study guide for scjp for exam.
- Get certified in first attempt download scjp-5-0 - SCJP 5/6 simulation.
- Click here to download scmad test study guide and practice question.
- Pass SUN scwcd - SCWCD
- Become SUN Java 5.0 certified.
- Best exam simulation SUN CX310-065 download free trial.
Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.