Problem Statement
Define deadlock in Java concurrency and list two practical strategies to avoid it.
Explanation
Deadlock occurs when threads hold locks the others need, and none can proceed. Avoidance strategies: 1) Establish a global lock ordering and always acquire locks in that order. 2) Use tryLock with timeout to detect and back off. Additional tips: minimize lock scope, prefer immutable data, and use higher-level concurrent structures.