Synchronization ngăn data corruption khi nhiều thread truy cập tài nguyên chia sẻ. Cơ chế: keyword synchronized (method hoặc block). synchronized method: lock toàn bộ method; synchronized block: chỉ lock đoạn code cụ thể (hiệu quả hơn). Chi phí: overhead hiệu năng, có thể gây deadlock. Dùng khi: nhiều thread thay đổi shared state.
Ví dụ: synchronized void incrementCounter() { count++; } đảm bảo atomic increment. Tránh over-synchronization vì giảm parallelism.