Java Tutorials - Herong's Tutorial Notes
Dr. Herong Yang, Version 6.00

Synchronization Technique and Synchronized Code Blocks

This chapter provides tutorial notes and tutorial examples on synchronization technique and synchronized code blocks. Topics include what is the synchronization technique; synchronized class methods, instance methods, statement blocks; synchronized banking application sample.

Why Synchronization Is Needed in Multi-Threading Applications?

Synchronization Technique - Lock and Synchronized Code

"synchronized" - How Java Supports Synchronization

BankingThread.java - Synchronization Sample Program

BankingThread.java - Synchronization Sample Program Output

Dr. Herong Yang, updated in 2008
Synchronization Technique and Synchronized Code Blocks